From 137c74348b97b3b861d46ec08ff4512e2d9aa381 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Sun, 9 Feb 2025 13:27:07 +0800 Subject: [PATCH] Refine --- auto_realtime.py | 4 +--- simulation.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/auto_realtime.py b/auto_realtime.py index 237a29c..830e1a9 100644 --- a/auto_realtime.py +++ b/auto_realtime.py @@ -60,9 +60,7 @@ def run_simulation_job() -> None: """ # 获取当前时间,并检查是否是整点15分钟 current_time = datetime.now() - # DingZQ - # if current_time.minute % 15 == 0: - if True: + if current_time.minute % 15 == 0: print(f"{current_time.strftime('%Y-%m-%d %H:%M:%S')} -- Start simulation task.") # 计算前,获取scada_info中的信息,按照设定的方法修改pg数据库 diff --git a/simulation.py b/simulation.py index 2323670..d11c9aa 100644 --- a/simulation.py +++ b/simulation.py @@ -1010,7 +1010,7 @@ def run_simulation(name: str, simulation_type: str, modify_pattern_start_time: s close_project(name_c) - time.sleep(5) # wait 50 seconds + time.sleep(5) # wait 5 seconds tmp_file = './temp/simulation.result.out' shutil.copy(f'./temp/{name_c}.db.opt', tmp_file)