X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=update_daemon2.php;h=80848bd0a4307d94a9d73e07a0d98f70b4268a8c;hb=40b67ac7c7de479a4dc04c8a42a410464dd1aa4c;hp=1b9e57638eecfafe2b55858b5bbdb44d81db9001;hpb=a2d799815a95e9c76e81525d1007b38971662e6d;p=tt-rss.git diff --git a/update_daemon2.php b/update_daemon2.php index 1b9e5763..80848bd0 100755 --- a/update_daemon2.php +++ b/update_daemon2.php @@ -1,12 +1,13 @@ #!/usr/bin/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); }