From 525b149e026f0a0c24101c9f36c6a3adfd917a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 16 Apr 2021 15:09:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Events/OnWorkerStart.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/HttpServer/Events/OnWorkerStart.php b/HttpServer/Events/OnWorkerStart.php index 39c4066c..04054c2b 100644 --- a/HttpServer/Events/OnWorkerStart.php +++ b/HttpServer/Events/OnWorkerStart.php @@ -64,7 +64,7 @@ class OnWorkerStart extends Callback */ public function onTask(Server $server, Annotation $annotation) { - $annotation->runtime(MODEL_PATH); + $annotation->runtime(directory('app')); putenv('environmental=' . Snowflake::TASK); @@ -85,10 +85,7 @@ class OnWorkerStart extends Callback { try { $time = microtime(true); - $annotation->runtime(CONTROLLER_PATH); - $this->debug('load controller time .' . (microtime(true) - $time)); - - $annotation->runtime(directory('app'), CONTROLLER_PATH); + $annotation->runtime(directory('app')); name($server->worker_pid, 'Worker#' . $server->worker_id);