【程序目录】fix(queue): adjust queue service check logic

add check for queue open status, skip process check when queue is disabled
This commit is contained in:
sugar1569 2026-05-20 18:44:20 +08:00
parent 850e42536b
commit 7797336273

View File

@ -132,6 +132,10 @@ class PublicController
$thinkPath = root_path(); // think 文件的绝对路径
$checkService = function($service) {
if($service === 'queue'){
// 检查队列设置是否开启,如果关闭则直接返回true,否则检查队列是否启动成功
if (sys_config('queue_open', 0) == 0) {
return false;
}
$command = 'queue:listen';
// 执行 ps 命令查找队列进程
exec("ps aux | grep '{$command}' | grep -v grep", $output);