BUGFIX: We need to sleep at least 1 second or we get doubles
This commit is contained in:
parent
159ec33a22
commit
3a95d23d8b
@ -89,7 +89,7 @@ class DaemonCommand extends Command
|
||||
file_put_contents($this->kernel->getCacheDir() . '/daemon-running.lock', time());
|
||||
|
||||
$maxwait = time() + 30;
|
||||
$nextrun = $jobRepo->getTimeOfNextRun();
|
||||
$nextrun = max($jobRepo->getTimeOfNextRun(), time() + 1);
|
||||
$sleepuntil = min($maxwait, $nextrun);
|
||||
if($sleepuntil > time()) time_sleep_until($sleepuntil);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user