改名
This commit is contained in:
@@ -38,15 +38,14 @@ class OnWorkerStart extends Callback
|
|||||||
public function onHandler(Server $server, int $worker_id): void
|
public function onHandler(Server $server, int $worker_id): void
|
||||||
{
|
{
|
||||||
Coroutine::set(['enable_deadlock_check' => false]);
|
Coroutine::set(['enable_deadlock_check' => false]);
|
||||||
|
|
||||||
putenv('worker=' . $worker_id);
|
putenv('worker=' . $worker_id);
|
||||||
|
|
||||||
$this->debug(sprintf('System#%d start.', $worker_id));
|
|
||||||
if ($worker_id >= $server->setting['worker_num']) {
|
if ($worker_id >= $server->setting['worker_num']) {
|
||||||
$this->onTask($server, $worker_id);
|
$this->onTask($server, $worker_id);
|
||||||
} else {
|
} else {
|
||||||
$this->onWorker($server, $worker_id);
|
$this->onWorker($server, $worker_id);
|
||||||
}
|
}
|
||||||
|
$this->debug(sprintf('%s#%d start.', env('environmental'), $worker_id));
|
||||||
Coroutine\go([$this, 'onSignal'], $server, $worker_id);
|
Coroutine\go([$this, 'onSignal'], $server, $worker_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user