mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 05:50:50 +00:00
【程序目录】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:
parent
850e42536b
commit
7797336273
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user