X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=update_daemon2.php;h=6f493b9b580ceea25a321bd61eea869df9d29a9d;hb=17e74b21cf7dcb6d57c44b3cbf5e4c330f5f2c17;hp=7062e8e354cd9bc08a205566a742b18ccf8de72e;hpb=dc24b520ccea0f092ea44f97352de20a796f4954;p=tt-rss.git diff --git a/update_daemon2.php b/update_daemon2.php index 7062e8e3..6f493b9b 100755 --- a/update_daemon2.php +++ b/update_daemon2.php @@ -121,6 +121,7 @@ $longopts = array("log:", "tasks:", "interval", + "quiet", "help"); $options = getopt("", $longopts); @@ -185,7 +186,7 @@ // respect the spawn interval $next_spawn = $last_checkpoint + $spawn_interval - time(); - if ($next_spawn % 10 == 0) { + if ($next_spawn % 60 == 0) { $running_jobs = count($children); _debug("[MASTER] active jobs: $running_jobs, next spawn at $next_spawn sec."); } @@ -246,6 +247,8 @@ // or regenerate feedbrowser cache if (rand(0,100) > 30) { + _debug("Waiting before update.."); + sleep(rand(5,15)); update_daemon_common($link); } else { $count = update_feedbrowser_cache($link); @@ -274,10 +277,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(); }