X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=update_daemon2.php;h=af29ac18f86e0987f23cc365324cdaadadd63010;hb=2c940c4861b8d059e9de65826c8a0c48a025c519;hp=27b4c35d6462721f04f4aa03342475b2b162980c;hpb=d043c0069ed6e7e33e5ee019eca725fa4029ef1e;p=tt-rss.git diff --git a/update_daemon2.php b/update_daemon2.php index 27b4c35d..af29ac18 100755 --- a/update_daemon2.php +++ b/update_daemon2.php @@ -1,9 +1,7 @@ -#!/usr/bin/php +#!/usr/bin/env php 30) { - update_daemon_common($link); - } else { - $count = update_feedbrowser_cache($link); - _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)"); + $my_pid = posix_getpid(); - db_close($link); + passthru(PHP_EXECUTABLE . " update.php --daemon-loop $quiet $log --task $j --pidlock $my_pid"); - // 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); } - - // We wait a little time before the next fork, in order to let the first fork - // mark the feeds it update : - sleep(1); } $last_checkpoint = time(); }