Allow modifing cron limits

[MAILPOET-2367]
This commit is contained in:
Pavel Dohnal
2019-09-23 14:29:51 +02:00
committed by Jack Kitterhing
parent 4d3a005b20
commit 1bedf1fd1a
5 changed files with 19 additions and 7 deletions

View File

@@ -73,8 +73,8 @@ class DaemonHttpRunner {
// if workers took less time to execute than the daemon execution limit,
// pause daemon execution to ensure that daemon runs only once every X seconds
$elapsed_time = microtime(true) - $this->timer;
if ($elapsed_time < CronHelper::DAEMON_EXECUTION_LIMIT) {
$this->pauseExecution(CronHelper::DAEMON_EXECUTION_LIMIT - $elapsed_time);
if ($elapsed_time < CronHelper::getDaemonExecutionLimit()) {
$this->pauseExecution(CronHelper::getDaemonExecutionLimit() - $elapsed_time);
}
}
// after each execution, re-read daemon data in case it changed