modify
This commit is contained in:
@@ -66,12 +66,12 @@ class OnWorkerStart extends Callback
|
|||||||
go(function () use ($server, $workerId) {
|
go(function () use ($server, $workerId) {
|
||||||
try {
|
try {
|
||||||
$sigkill = Coroutine::waitSignal(SIGKILL | SIGUSR1);
|
$sigkill = Coroutine::waitSignal(SIGKILL | SIGUSR1);
|
||||||
|
var_dump($sigkill);
|
||||||
if ($sigkill !== false) {
|
if ($sigkill !== false) {
|
||||||
while (Snowflake::app()->isRun()) {
|
while (Snowflake::app()->isRun()) {
|
||||||
Coroutine::sleep(1);
|
Coroutine::sleep(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Snowflake::app()->stateInit();
|
|
||||||
$server->stop($server->worker_id, true);
|
$server->stop($server->worker_id, true);
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->addError($exception);
|
$this->addError($exception);
|
||||||
|
|||||||
Reference in New Issue
Block a user