Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 21a3a07

Browse files
committed
fix task worker num for showing info
1 parent 59ded92 commit 21a3a07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Commands/HttpServerCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ protected function showInfos()
217217
$reactorNum = Arr::get($this->config, 'server.options.reactor_num');
218218
$workerNum = Arr::get($this->config, 'server.options.worker_num');
219219
$taskWorkerNum = Arr::get($this->config, 'server.options.task_worker_num');
220-
$isWebsocket = Arr::get($this->config, 'websocket.enabled');
220+
$hasTaskWorker = Arr::get($this->config, 'websocket.enabled') || Arr::get($this->config, 'queue.default') === 'swoole';
221221
$logFile = Arr::get($this->config, 'server.options.log_file');
222222

223223
$table = [
@@ -229,7 +229,7 @@ protected function showInfos()
229229
['Server Status', $isRunning ? 'Online' : 'Offline'],
230230
['Reactor Num', $reactorNum],
231231
['Worker Num', $workerNum],
232-
['Task Worker Num', $isWebsocket ? $taskWorkerNum : 0],
232+
['Task Worker Num', $hasTaskWorker ? $taskWorkerNum : 0],
233233
['Websocket Mode', $isWebsocket ? 'On' : 'Off'],
234234
['PID', $isRunning ? $pid : 'None'],
235235
['Log Path', $logFile],

0 commit comments

Comments
 (0)