From 8321a3272ec02cc4d60b4840e55c25758a480afd Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 7 May 2024 18:21:03 +0800 Subject: [PATCH] =?UTF-8?q?refector:=20=E5=8E=BB=E9=99=A4set=5Feq=5Frs?= =?UTF-8?q?=E6=89=93=E7=9A=84=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/em/services.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/em/services.py b/apps/em/services.py index 34d58774..4e5b0cd7 100644 --- a/apps/em/services.py +++ b/apps/em/services.py @@ -18,8 +18,6 @@ def get_eq_rs(equipId: str): def set_eq_rs(equipId, last_timex: datetime, last_mrs: int): """更新设备运行状态(包括缓存和数据库) """ - if equipId == '3574620497738379264' and last_mrs == Equipment.RUNING: - myLogger.error(f'{equipId} {last_timex} {last_mrs}') if last_mrs == Equipment.OFFLINE: # 如果是离线直接更新 cache.set(f"equipment_{equipId}", {"running_state": last_mrs, "running_state_timex": last_timex}, timeout=None) # 更新缓存 Equipment.objects.filter(id=equipId).update(running_state=last_mrs) # 更新数据库