mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:10:11 +00:00
Fixed locking behaviour for the worker
This commit is contained in:
parent
12cb5a6848
commit
21eb9a4b2e
7 changed files with 50 additions and 35 deletions
|
@ -900,12 +900,12 @@ class App {
|
|||
return;
|
||||
}
|
||||
|
||||
// If the last worker fork was less than 10 seconds before then don't fork another one.
|
||||
// If the last worker fork was less than 2 seconds before then don't fork another one.
|
||||
// This should prevent the forking of masses of workers.
|
||||
$cachekey = 'app:proc_run:started';
|
||||
$result = Cache::get($cachekey);
|
||||
|
||||
if (!is_null($result) AND ( time() - $result) < 10) {
|
||||
if (!is_null($result) AND ( time() - $result) < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue