This commit is contained in:
2025-07-16 14:54:35 +08:00
parent 9376a73628
commit 37b59c8536
+4
View File
@@ -71,6 +71,7 @@ class OnServerWorker extends Kiri\Server\Abstracts\Server
*/
public function onWorkerStart(Server $server, int $workerId): void
{
try {
$this->dispatch->dispatch(new OnBeforeWorkerStart($server, $workerId));
if ($workerId < $server->setting['worker_num']) {
CoordinatorManager::utility(Coordinator::WORKER_START)->waite();
@@ -80,6 +81,9 @@ class OnServerWorker extends Kiri\Server\Abstracts\Server
$this->dispatch->dispatch(new OnTaskerStart($server, $workerId));
}
$this->dispatch->dispatch(new OnAfterWorkerStart($server, $workerId));
} catch (Throwable $exception) {
Kiri::getLogger()->println(throwable($exception));
}
}