// Count active workers and compare them with a maximum value that depends on the load
if (self::tooMuchWorkers()) {
logger('Active worker limit reached, quitting.', LOGGER_DEBUG);
+ Lock::release('worker');
return;
}
// Check free memory
if ($a->min_memory_reached()) {
logger('Memory limit reached, quitting.', LOGGER_DEBUG);
+ Lock::release('worker');
return;
}
Lock::release('worker');
{
$command = 'bin/worker.php';
- $args = [ 'cron' => $do_cron ];
+ $args = ['no_cron' => !$do_cron];
get_app()->proc_run($command, $args);