mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:02:58 +00:00
And moving the block back to the old place
This commit is contained in:
parent
e1cc7262de
commit
11e39da6cc
1 changed files with 7 additions and 7 deletions
|
@ -124,13 +124,6 @@ class Worker
|
|||
self::$state = self::STATE_LONG_LOOP;
|
||||
}
|
||||
|
||||
// Quit the worker once every cron interval
|
||||
if (time() > ($starttime + Config::get('system', 'cron_interval'))) {
|
||||
Logger::log('Process lifetime reached, respawning.', Logger::DEBUG);
|
||||
self::spawnWorker();
|
||||
return;
|
||||
}
|
||||
|
||||
// To avoid the quitting of multiple workers only one worker at a time will execute the check
|
||||
if (Lock::acquire('worker', 0)) {
|
||||
// Count active workers and compare them with a maximum value that depends on the load
|
||||
|
@ -148,6 +141,13 @@ class Worker
|
|||
}
|
||||
Lock::release('worker');
|
||||
}
|
||||
|
||||
// Quit the worker once every cron interval
|
||||
if (time() > ($starttime + Config::get('system', 'cron_interval'))) {
|
||||
Logger::log('Process lifetime reached, respawning.', Logger::DEBUG);
|
||||
self::spawnWorker();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Cleaning up. Possibly not needed, but it doesn't harm anything.
|
||||
|
|
Loading…
Reference in a new issue