Configurable delay between queuedaemon.php spawns/respawns to help stagger out startups and subscriptions. Defaults to 1 second.
$config['queue']['spawndelay'] = 1;
This commit is contained in:
@@ -83,6 +83,7 @@ abstract class SpawningDaemon extends Daemon
|
||||
$this->log(LOG_INFO, "Spawned thread $i as pid $pid");
|
||||
$children[$i] = $pid;
|
||||
}
|
||||
sleep(common_config('queue', 'spawndelay'));
|
||||
}
|
||||
|
||||
$this->log(LOG_INFO, "Waiting for children to complete.");
|
||||
@@ -111,6 +112,7 @@ abstract class SpawningDaemon extends Daemon
|
||||
$this->log(LOG_INFO, "Respawned thread $i as pid $pid");
|
||||
$children[$i] = $pid;
|
||||
}
|
||||
sleep(common_config('queue', 'spawndelay'));
|
||||
} else {
|
||||
$this->log(LOG_INFO, "Thread $i pid $pid exited with status $exitCode; closing out thread.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user