Skip to content

Commit

Permalink
fix: Worker 增加 $statusFile 变量默认设置
Browse files Browse the repository at this point in the history
  • Loading branch information
zoujingli committed Nov 8, 2024
1 parent b83331d commit 62f8b04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin/think-plugs-worker/src/command/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ public function execute(Input $input, Output $output)
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) {
Expand Down

0 comments on commit 62f8b04

Please sign in to comment.