This commit is contained in:
as2252258@163.com
2021-04-07 02:44:19 +08:00
parent 074d6a05cb
commit f4cbc4b409
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -67,6 +67,15 @@ class ServerInotify extends Process
set_error_handler([$this, 'onErrorHandler']);
$this->dirs = Config::get('inotify', [APP_PATH]);
Coroutine\go(function () use ($process) {
$workerId = $process->read(3);
$annotation = Snowflake::app()->getAnnotation();
$server = Snowflake::app()->getSwoole();
$server->sendMessage($annotation->getLoader(),(int) $workerId);
});
$this->loadAnnotation();
if (extension_loaded('inotify')) {