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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user