This commit is contained in:
2021-03-02 14:34:23 +08:00
parent a362167e9c
commit 45aa265866
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -25,8 +25,7 @@ class OnWorkerStart extends Callback
{ {
/** @var int 重启信号 */ /** @var int 重启信号 */
private int $signal = SIGUSR1 | SIGUSR2 | SIGKILL; private int $signal = SIGUSR1 | SIGKILL;
/** /**
@@ -47,7 +46,7 @@ class OnWorkerStart extends Callback
$this->onWorker($server, $worker_id); $this->onWorker($server, $worker_id);
} }
$this->debug(sprintf('%s #%d Pid:%d start.', ucfirst(env('environmental')), $worker_id, $server->worker_pid)); $this->debug(sprintf('%s #%d Pid:%d start.', ucfirst(env('environmental')), $worker_id, $server->worker_pid));
// Coroutine\go([$this, 'onSignal'], $server, $worker_id); Coroutine\go([$this, 'onSignal'], $server, $worker_id);
} }
+1 -1
View File
@@ -376,7 +376,7 @@ class Snowflake
*/ */
public static function reload(): mixed public static function reload(): mixed
{ {
return Process::kill((int)Snowflake::getMasterPid(), SIGUSR1 | SIGKILL); return Process::kill((int)Snowflake::getMasterPid(), SIGUSR1);
} }