diff --git a/Src/Core/Listener/WorkerStartListener.php b/Src/Core/Listener/WorkerStartListener.php index 7541f3fe..724aa6e4 100644 --- a/Src/Core/Listener/WorkerStartListener.php +++ b/Src/Core/Listener/WorkerStartListener.php @@ -10,6 +10,10 @@ class WorkerStartListener implements ListenerInterface { public function run(...$params) { + if (ini_get('opcache.enable') || ini_get('opcache.enable_cli')) { + opcache_reset(); + } + \isetProcessTitle( 'w7swoole ' . App::$server->type . (App::$server->server->taskworker ? ' task' : '') . ' worker process'); //设置安全限制目录 diff --git a/Src/Core/Process/ReloadProcess.php b/Src/Core/Process/ReloadProcess.php index 5f598f30..eba945cf 100644 --- a/Src/Core/Process/ReloadProcess.php +++ b/Src/Core/Process/ReloadProcess.php @@ -76,9 +76,7 @@ public function run(Process $process) { if ($startReload) { $server->isRun(); $server->getServer()->reload(); - if (ini_get('opcache.enable') || ini_get('opcache.enable_cli')) { - opcache_reset(); - } + if (!$this->debug) { ioutputer()->writeln("Reloaded in " . date('m-d H:i:s') . "..."); }