This commit is contained in:
2020-09-07 16:10:29 +08:00
parent 5cbf792474
commit 4b3173922e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ class OnManagerStart extends Callback
public function onHandler(Server $server) public function onHandler(Server $server)
{ {
$this->debug('manager start.'); $this->debug('manager start.');
Snowflake::setProcessId($server->manager_pid); Snowflake::setWorkerId($server->manager_pid);
$events = Snowflake::app()->event; $events = Snowflake::app()->event;
if ($events->exists(Event::SERVER_MANAGER_START)) { if ($events->exists(Event::SERVER_MANAGER_START)) {
+1 -1
View File
@@ -39,7 +39,7 @@ class ServerInotify extends Process
*/ */
public function onHandler(\Swoole\Process $process) public function onHandler(\Swoole\Process $process)
{ {
Snowflake::setProcessId($process->pid); Snowflake::setWorkerId($process->pid);
set_error_handler([$this, 'onErrorHandler']); set_error_handler([$this, 'onErrorHandler']);
if (extension_loaded('inotify')) { if (extension_loaded('inotify')) {
$this->inotify = inotify_init(); $this->inotify = inotify_init();