This commit is contained in:
2021-03-02 18:16:34 +08:00
parent 104a0bfe73
commit 967bfa2b37
6 changed files with 28 additions and 8 deletions
+1 -4
View File
@@ -13,6 +13,7 @@ use Snowflake\Exception\ConfigException;
use Snowflake\Snowflake;
use Swoole\Coroutine;
use Swoole\Server;
use Swoole\Timer;
/**
* Class OnWorkerStart
@@ -26,7 +27,6 @@ class OnWorkerStart extends Callback
private int $signal = SIGUSR1 | SIGKILL | SIGKILL;
/**
* @param Server $server
* @param int $worker_id
@@ -44,9 +44,7 @@ class OnWorkerStart extends Callback
} else {
$this->onWorker($server, $worker_id);
}
$this->debug(sprintf('%s #%d Pid:%d start.', ucfirst(env('environmental')), $worker_id, $server->worker_pid));
// Coroutine\go([$this, 'onSignal'], $server, $worker_id);
}
@@ -85,7 +83,6 @@ class OnWorkerStart extends Callback
}
/**
* @param $server
* @param $worker_id