]> code.citadel.org Git - citadel.git/commitdiff
Run RSS pulls no more than once every 15 minutes.
authorArt Cancro <ajc@uncensored.citadel.org>
Sun, 13 Mar 2011 07:14:11 +0000 (03:14 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Sun, 13 Mar 2011 07:14:11 +0000 (03:14 -0400)
The last_run check had been pulled and we were running every minute.

citadel/modules/rssclient/serv_rssclient.c

index 0bb6c778d1270fcd85d7e32e22181f254051f3bf..f9e6544deb23677df3782cb96a1659b2c317b4c2 100644 (file)
@@ -1483,6 +1483,11 @@ void rssclient_scan(void) {
        static int doing_rssclient = 0;
        rssnetcfg *rptr = NULL;
 
+       /* Run no more than once every 15 minutes. */
+       if ((time(NULL) - last_run) < 900) {
+               return;
+       }
+
        /*
         * This is a simple concurrency check to make sure only one rssclient run
         * is done at a time.  We could do this with a mutex, but since we