改名
This commit is contained in:
@@ -118,17 +118,18 @@ class ServerCommand extends Command
|
|||||||
$this->eventProvider->on(OnBeforeWorkerStart::class, [di(OnServerWorker::class), 'setConfigure']);
|
$this->eventProvider->on(OnBeforeWorkerStart::class, [di(OnServerWorker::class), 'setConfigure']);
|
||||||
$this->eventProvider->on(OnWorkerStart::class, [di(WorkerDispatch::class), 'dispatch']);
|
$this->eventProvider->on(OnWorkerStart::class, [di(WorkerDispatch::class), 'dispatch']);
|
||||||
$this->eventProvider->on(OnTaskerStart::class, [di(TaskerDispatch::class), 'dispatch']);
|
$this->eventProvider->on(OnTaskerStart::class, [di(TaskerDispatch::class), 'dispatch']);
|
||||||
|
|
||||||
$this->eventProvider->on(OnAfterWorkerStart::class, function () {
|
$this->eventProvider->on(OnAfterWorkerStart::class, function () {
|
||||||
$lists = HandlerManager::getHandlers();
|
$lists = HandlerManager::getHandlers();
|
||||||
foreach ($lists as $list) {
|
foreach ($lists as $list) {
|
||||||
foreach ($list as $value) {
|
Coroutine\go(function () use ($list) {
|
||||||
/** @var Handler|Closure $list */
|
foreach ($list as $value) {
|
||||||
if ($value->callback instanceof \Closure) {
|
/** @var Handler|Closure $list */
|
||||||
continue;
|
if ($value->callback instanceof \Closure) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
MiddlewareManager::add($value->callback[0], $value->callback[1], null);
|
||||||
}
|
}
|
||||||
MiddlewareManager::add($value->callback[0], $value->callback[1], null);
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$manager->start();
|
$manager->start();
|
||||||
|
|||||||
Reference in New Issue
Block a user