From 779733627341fdb56e2c2291f695c18d3de52eaf Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Wed, 20 May 2026 18:44:20 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E3=80=91fix(queue):=20adjust=20queue=20service=20check=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add check for queue open status, skip process check when queue is disabled --- crmeb/app/adminapi/controller/PublicController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crmeb/app/adminapi/controller/PublicController.php b/crmeb/app/adminapi/controller/PublicController.php index 4637dfdf0..f32ca10f9 100644 --- a/crmeb/app/adminapi/controller/PublicController.php +++ b/crmeb/app/adminapi/controller/PublicController.php @@ -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);