This commit is contained in:
2020-09-01 15:54:34 +08:00
parent 01a8ef354c
commit e457bc62a0
-3
View File
@@ -30,9 +30,6 @@ class Processes extends Component
$application = Snowflake::get();
$server = $application->set(Pool::class, new Pool($this->size(), SWOOLE_IPC_UNIXSOCK));
$server->on('workerStart', function (Pool $pool, int $workerId) use ($application) {
if (is_string($this->processes[$workerId]) && class_exists($this->processes[$workerId])) {
Config::set($this->processes[$workerId], $workerId);
}
ServerManager::create($pool, $this->processes[$workerId], $workerId);
});
$server->on('workerStop', function (Pool $pool, int $workerId) {