From 804727352db194798e898db96987eb96b42bfe6e Mon Sep 17 00:00:00 2001 From: "xianzelin@huoxian.cn" Date: Sat, 20 Nov 2021 10:24:21 +0800 Subject: [PATCH] fix heart beat --- apiserver/report/handler/heartbeat_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/report/handler/heartbeat_handler.py b/apiserver/report/handler/heartbeat_handler.py index d028d85..64f7dba 100644 --- a/apiserver/report/handler/heartbeat_handler.py +++ b/apiserver/report/handler/heartbeat_handler.py @@ -56,7 +56,7 @@ def save_heartbeat(self): if heartbeat: queryset.exclude(pk=heartbeat.id).delete() heartbeat.dt = int(time.time()) - if self.replay_queue == 1: + if self.return_queue == 1: heartbeat.req_count = self.req_count heartbeat.report_queue = self.report_queue heartbeat.method_queue = self.method_queue @@ -64,7 +64,7 @@ def save_heartbeat(self): heartbeat.save(update_fields=[ 'req_count', 'dt', 'report_queue', 'method_queue', 'replay_queue' ]) - elif self.replay_queue == 0: + elif self.return_queue == 0: heartbeat.memory = self.memory heartbeat.cpu = self.cpu heartbeat.save(update_fields=[