From 62f8b0471dc78e4deb0a6ba0f1657683bbe2a7c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 8 Nov 2024 22:27:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Worker=20=E5=A2=9E=E5=8A=A0=20$statusFil?= =?UTF-8?q?e=20=E5=8F=98=E9=87=8F=E9=BB=98=E8=AE=A4=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/think-plugs-worker/src/command/Worker.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/think-plugs-worker/src/command/Worker.php b/plugin/think-plugs-worker/src/command/Worker.php index 100c364c7..033fc4ebe 100644 --- a/plugin/think-plugs-worker/src/command/Worker.php +++ b/plugin/think-plugs-worker/src/command/Worker.php @@ -79,8 +79,12 @@ class Worker extends Command if (empty($this->config['worker']['pidFile'])) { $this->config['worker']['pidFile'] = syspath("safefile/worker/worker_{$port}.pid"); } + if (empty($this->config['worker']['statusFile'])) { + $this->config['worker']['statusFile'] = syspath("safefile/worker/worker_{$port}.status"); + } is_dir($dir = dirname($this->config['worker']['pidFile'])) or mkdir($dir, 0777, true); is_dir($dir = dirname($this->config['worker']['logFile'])) or mkdir($dir, 0777, true); + is_dir($dir = dirname($this->config['worker']['statusFile'])) or mkdir($dir, 0777, true); // 静态属性设置 foreach ($this->config['worker'] ?? [] as $name => $value) {