fix: 修改celery健康检测worker数量

pull/5736/head
Bai 2021-03-12 14:09:54 +08:00 committed by Jiangjie.Bai
parent c57cce8881
commit 296bb88834
1 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,8 @@ def get_celery_status():
ping_data = i.ping() or {}
active_nodes = [k for k, v in ping_data.items() if v.get('ok') == 'pong']
active_queue_worker = set([n.split('@')[0] for n in active_nodes if n])
if len(active_queue_worker) < 5:
# Celery Worker 数量: 2
if len(active_queue_worker) < 2:
print("Not all celery worker worked")
return False
else: