X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=update_daemon2.php;h=1dddf6efdaec9d63edec1ef77eb2de4a9531753f;hb=110ce72a72468c30ffb9bb9b77e449314e4b10a1;hp=c8556a61e6d499b1bbe223f2d6a039db03df9f9e;hpb=8ccaff02b50c32acb6162f9f527bf2801f725ace;p=tt-rss.git diff --git a/update_daemon2.php b/update_daemon2.php index c8556a61..1dddf6ef 100755 --- a/update_daemon2.php +++ b/update_daemon2.php @@ -1,44 +1,44 @@ -#!/usr/bin/php +#!/usr/bin/env php 30) { - update_daemon_common($link); - } else { - $count = update_feedbrowser_cache($link); - _debug("Finished, $count feeds processed."); - } + $my_pid = posix_getpid(); - _debug("Elapsed time: " . (time() - $start_timestamp) . " second(s)"); - - 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(); }