X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=update_daemon2.php;h=c6e215a29e20aa7708e6d30e1819f510ac5a8e88;hb=a26f0c1759427ff23d26dc2b693b73562f9e72cd;hp=b79a1a2b282e32b6a015051063a702b83c990230;hpb=369dbc19d6ae35c97a2306ae4821c7812e2f24b2;p=tt-rss.git diff --git a/update_daemon2.php b/update_daemon2.php index b79a1a2b..c6e215a2 100755 --- a/update_daemon2.php +++ b/update_daemon2.php @@ -1,10 +1,7 @@ #!/usr/bin/env php 30) { - update_daemon_common($link); - } else { + if (rand(0,100) > 50) { $count = update_feedbrowser_cache($link); _debug("Feedbrowser updated, $count feeds processed."); @@ -212,13 +277,20 @@ _debug("Cleaned $rc cached tags."); - _debug("Updating linked feeds..."); - get_linked_feeds($link); - + global $pluginhost; + $pluginhost->run_hooks($pluginhost::HOOK_UPDATE_TASK, "hook_update_task", $op); } _debug("Elapsed time: " . (time() - $start_timestamp) . " second(s)"); + if ($nf > 0) { + _debug("Feeds processed: $nf"); + + if (time() - $start_timestamp > 0) { + _debug("Feeds/minute: " . sprintf("%.2d", $nf/((time()-$start_timestamp)/60))); + } + } + db_close($link); // We are in a fork. @@ -230,10 +302,6 @@ // 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(); }