From 9b2ef62aeef358ac29044c1fc03ef6623eed758e Mon Sep 17 00:00:00 2001 From: Zhichang Yu Date: Fri, 13 Dec 2024 17:31:15 +0800 Subject: [PATCH] Fix xinfo_groups returns unexpected result (#4026) ### What problem does this PR solve? Fix xinfo_groups returns unexpected result. Close #3545 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/svr/task_executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rag/svr/task_executor.py b/rag/svr/task_executor.py index aa951b74f..2b893cf56 100644 --- a/rag/svr/task_executor.py +++ b/rag/svr/task_executor.py @@ -529,8 +529,8 @@ def report_status(): now = datetime.now() group_info = REDIS_CONN.queue_info(SVR_QUEUE_NAME, "rag_flow_svr_task_broker") if group_info is not None: - PENDING_TASKS = int(group_info["pending"]) - LAG_TASKS = int(group_info["lag"]) + PENDING_TASKS = int(group_info.get("pending", 0)) + LAG_TASKS = int(group_info.get("lag", 0)) with mt_lock: heartbeat = json.dumps({