X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=update_daemon2.php;h=05b55ffe311a636901d9f20648227ffeeb88711f;hb=88e8fb3a7132d1321ab65b66a19a67df890c402d;hp=1b9e57638eecfafe2b55858b5bbdb44d81db9001;hpb=98d684f99ba839ff1514675f2786f0f851e5cbf6;p=tt-rss.git diff --git a/update_daemon2.php b/update_daemon2.php index 1b9e5763..05b55ffe 100755 --- a/update_daemon2.php +++ b/update_daemon2.php @@ -1,12 +1,10 @@ -#!/usr/bin/php +#!/usr/bin/env php 50) { + if (rand(0,100) > 30) { update_daemon_common($link); } else { $count = update_feedbrowser_cache($link); - _debug("Finished, $count feeds processed."); + _debug("Feedbrowser updated, $count feeds processed."); + + purge_orphans($link, true); + + $rc = cleanup_tags($link, 14, 50000); + + _debug("Cleaned $rc cached tags."); + + _debug("Updating linked feeds..."); + get_linked_feeds($link); + } _debug("Elapsed time: " . (time() - $start_timestamp) . " second(s)"); - + db_close($link); // We are in a fork. // We wait a little before exiting to avoid to be faster than our parent process. sleep(1); + + unlink(LOCK_DIRECTORY . "/$lock_filename"); + // We exit in order to avoid fork bombing. exit(0); }