This commit is contained in:
as2252258@163.com
2021-02-28 18:03:43 +08:00
parent e9aa181c8e
commit be74e4dc62
+1 -1
View File
@@ -39,12 +39,12 @@ class OnWorkerStart extends Callback
Coroutine::set(['enable_deadlock_check' => false]);
Snowflake::app()->stateInit();
$this->debug(sprintf('System#%d start.', $worker_id));
if ($worker_id >= $server->setting['worker_num']) {
$this->onTask($server, $worker_id);
} else {
$this->onWorker($server, $worker_id);
}
$this->debug(sprintf('%s#%d start.', Snowflake::getEnvironmental(), $worker_id));
Coroutine::create([$this, 'onSignal'], $server, $worker_id);
}