]> git.wh0rd.org - tt-rss.git/blobdiff - include/rssfuncs.php
unify houskeeping stuff, increase spawn interval
[tt-rss.git] / include / rssfuncs.php
index 48638f57ef6e08a102b0294e8fb5c992d0af6e4e..a64d60e1eebbbc84ba29e89dcda4b7713cb035c1 100644 (file)
@@ -1,7 +1,7 @@
 <?php
        define_default('DAEMON_UPDATE_LOGIN_LIMIT', 30);
        define_default('DAEMON_FEED_LIMIT', 500);
-       define_default('DAEMON_SLEEP_INTERVAL', 60);
+       define_default('DAEMON_SLEEP_INTERVAL', 120);
 
        function update_feedbrowser_cache() {
 
                                WHERE feed_url IN (%s)", implode(',', $feeds_quoted)));
                }
 
-               expire_cached_files($debug);
-               expire_lock_files($debug);
-               expire_error_log($debug);
-
                $nf = 0;
 
                // For each feed, we call the feed update function.
                return $error;
        }
 
+       function housekeeping_common($debug) {
+               expire_cached_files($debug);
+               expire_lock_files($debug);
+               expire_error_log($debug);
+
+               $count = update_feedbrowser_cache();
+               _debug("Feedbrowser updated, $count feeds processed.");
+
+               purge_orphans( true);
+               $rc = cleanup_tags( 14, 50000);
+
+               _debug("Cleaned $rc cached tags.");
+       }
 ?>