浏览代码

Adjusted heartbeat format (#3459)

### What problem does this PR solve?

Adjusted heartbeat format

### Type of change

- [x] Refactoring
tags/v0.14.0
Zhichang Yu 11 个月前
父节点
当前提交
f9643adc43
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      api/apps/system_app.py

+ 2
- 0
api/apps/system_app.py 查看文件

@@ -15,6 +15,7 @@
#
import logging
from datetime import datetime
import json

from flask_login import login_required, current_user

@@ -160,6 +161,7 @@ def status():
now = datetime.now().timestamp()
for task_executor_id in task_executors:
heartbeats = REDIS_CONN.zrangebyscore(task_executor_id, now - 60*30, now)
heartbeats = [json.loads(heartbeat) for heartbeat in heartbeats]
task_executor_heartbeats[task_executor_id] = heartbeats
except Exception:
logging.exception("get task executor heartbeats failed!")

正在加载...
取消
保存