111
This commit is contained in:
@@ -118,20 +118,6 @@ 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 () {
|
|
||||||
$lists = HandlerManager::getHandlers();
|
|
||||||
foreach ($lists as $list) {
|
|
||||||
Coroutine\go(function () use ($list) {
|
|
||||||
foreach ($list as $value) {
|
|
||||||
/** @var Handler|Closure $list */
|
|
||||||
if ($value->callback instanceof \Closure) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
MiddlewareManager::add($value->callback[0], $value->callback[1], null);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$manager->start();
|
$manager->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user