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)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 15:00:58 +0000 (15:00 +0000)
The last_run check had been pulled and we were running every minute.

citadel/modules/rssclient/serv_rssclient.c

index c580bebaf62867f4bec7cdc57cee3bf7948c5155..511edeced7ac0f217d3769b3b0b7cf5ef3396e87 100644 (file)
@@ -666,6 +666,11 @@ void rssclient_scan(void) {
        long len;
        const char *Key;
 
+       /* 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