fix: update_mpoint_cache 更新设备信号的bug
This commit is contained in:
parent
13adb0d4ea
commit
5b1575bca0
|
|
@ -39,7 +39,6 @@ def shutdown_or_startup(equipId: str, last_timex: datetime, last_mrs):
|
||||||
from apps.wpm.tasks import cal_exp_duration_hour
|
from apps.wpm.tasks import cal_exp_duration_hour
|
||||||
from apps.wpm.services import get_sflog
|
from apps.wpm.services import get_sflog
|
||||||
|
|
||||||
myLogger.error(f"{equipId} {last_timex} {last_mrs}")
|
|
||||||
equip = Equipment.objects.get(id=equipId)
|
equip = Equipment.objects.get(id=equipId)
|
||||||
equip.running_state = last_mrs
|
equip.running_state = last_mrs
|
||||||
equip.save(update_fields=["running_state"])
|
equip.save(update_fields=["running_state"])
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ def update_mpoint_cache(cache_key: str, current_cache_val: dict, last_timex: dat
|
||||||
if ep_belong_id:
|
if ep_belong_id:
|
||||||
set_eq_rs(ep_belong_id, last_timex, Equipment.RUNING)
|
set_eq_rs(ep_belong_id, last_timex, Equipment.RUNING)
|
||||||
if ep_monitored_id:
|
if ep_monitored_id:
|
||||||
set_eq_rs(ep_belong_id, last_timex, last_mrs)
|
set_eq_rs(ep_monitored_id, last_timex, last_mrs)
|
||||||
|
|
||||||
|
|
||||||
def king_sync(projectName: str, json_path: str = ""):
|
def king_sync(projectName: str, json_path: str = ""):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue