X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FWorker.php;h=3400f00ae1755229a24a20e16fc6844f1c7592c5;hb=505350c9fb9b16dde6c86d418947592ab3720282;hp=1de4d3b953414319548ac13ffdbad3f1eb906deb;hpb=ecea7425f8ad11ace4af39d476919e3203bff44f;p=friendica.git diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 1de4d3b953..3400f00ae1 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -117,12 +117,14 @@ class Worker // 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'); @@ -1011,7 +1013,7 @@ class Worker { $command = 'bin/worker.php'; - $args = [ 'cron' => $do_cron ]; + $args = ['no_cron' => !$do_cron]; get_app()->proc_run($command, $args);