From 6ab9b2401866f5951aaf74f7051e5f4e3b7f2587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 19 Apr 2021 15:26:34 +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 | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/HttpServer/Events/OnWorkerStart.php b/HttpServer/Events/OnWorkerStart.php index 380a9c29..3b39986e 100644 --- a/HttpServer/Events/OnWorkerStart.php +++ b/HttpServer/Events/OnWorkerStart.php @@ -65,12 +65,7 @@ class OnWorkerStart extends Callback { putenv('environmental=' . Snowflake::TASK); - $annotation->runtime(directory('app'), [ - CONTROLLER_PATH, - LISTENER_PATH, - SOCKET_PATH, - TASK_PATH, - ]); + $annotation->runtime(MODEL_PATH); name($server->worker_pid, 'Task#' . $server->worker_id); Snowflake::setTaskId($server->worker_pid); @@ -90,9 +85,8 @@ class OnWorkerStart extends Callback name($server->worker_pid, 'Worker#' . $server->worker_id); $time = microtime(true); - $annotation->runtime(CONTROLLER_PATH); + $annotation->runtime(APP_PATH); $this->debug('use time.' . microtime(true) - $time); - $annotation->runtime(directory('app'), CONTROLLER_PATH); Snowflake::setWorkerId($server->worker_pid); putenv('environmental=' . Snowflake::WORKER);