modify
This commit is contained in:
@@ -54,13 +54,13 @@ class OnWorkerStart extends Callback
|
|||||||
public function onHandler(Server $server, int $worker_id): void
|
public function onHandler(Server $server, int $worker_id): void
|
||||||
{
|
{
|
||||||
$annotation = $this->injectLoader();
|
$annotation = $this->injectLoader();
|
||||||
(new Pipeline())
|
$line = new Pipeline();
|
||||||
->if($this->isWorker($worker_id), function ($annotation, $server, $worker_id) {
|
$line->if($this->isWorker($worker_id), function ($annotation, $server, $worker_id) {
|
||||||
$annotation->runtime(CONTROLLER_PATH);
|
$annotation->runtime(CONTROLLER_PATH);
|
||||||
$annotation->runtime(APP_PATH, CONTROLLER_PATH);
|
$annotation->runtime(APP_PATH, CONTROLLER_PATH);
|
||||||
$this->onWorker($server, $server->worker_id);
|
$this->onWorker($server, $server->worker_id);
|
||||||
name($server->worker_pid, 'Worker.' . $worker_id);
|
name($server->worker_pid, 'Worker.' . $worker_id);
|
||||||
})
|
})
|
||||||
->else(function ($annotation, $server, $worker_id) {
|
->else(function ($annotation, $server, $worker_id) {
|
||||||
$annotation->runtime(MODEL_PATH);
|
$annotation->runtime(MODEL_PATH);
|
||||||
$this->onTask($server, $server->worker_id);
|
$this->onTask($server, $server->worker_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user