]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/rssclient/serv_rssclient.c
Run RSS pulls no more than once every 15 minutes.
[citadel.git] / 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