1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-03 17:19:15 +00:00

fix DAEMON_SLEEP_INTERVAL not being defined when used

enforce minimum 60 sec spawn/sleep interval in update processes
This commit is contained in:
Andrew Dolgov
2017-05-06 10:54:14 +03:00
parent e6c886bf66
commit 4fd0790804
4 changed files with 16 additions and 7 deletions

View File

@@ -181,8 +181,12 @@
$log = isset($options['log']) ? '--log '.$options['log'] : '';
passthru(PHP_EXECUTABLE . " " . $argv[0] ." --daemon-loop $quiet $log");
_debug("Sleeping for " . DAEMON_SLEEP_INTERVAL . " seconds...");
sleep(DAEMON_SLEEP_INTERVAL);
// let's enforce a minimum spawn interval as to not forkbomb the host
$spawn_interval = max(60, DAEMON_SLEEP_INTERVAL);
_debug("Sleeping for $spawn_interval seconds...");
sleep($spawn_interval);
}
}