zhichyu commited on
Commit
dc3a38c
·
1 Parent(s): 047697e

Fix xinfo_groups returns unexpected result (#4026)

Browse files

### 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)

Files changed (1) hide show
  1. rag/svr/task_executor.py +2 -2
rag/svr/task_executor.py CHANGED
@@ -529,8 +529,8 @@ def report_status():
529
  now = datetime.now()
530
  group_info = REDIS_CONN.queue_info(SVR_QUEUE_NAME, "rag_flow_svr_task_broker")
531
  if group_info is not None:
532
- PENDING_TASKS = int(group_info["pending"])
533
- LAG_TASKS = int(group_info["lag"])
534
 
535
  with mt_lock:
536
  heartbeat = json.dumps({
 
529
  now = datetime.now()
530
  group_info = REDIS_CONN.queue_info(SVR_QUEUE_NAME, "rag_flow_svr_task_broker")
531
  if group_info is not None:
532
+ PENDING_TASKS = int(group_info.get("pending", 0))
533
+ LAG_TASKS = int(group_info.get("lag", 0))
534
 
535
  with mt_lock:
536
  heartbeat = json.dumps({