补充readme以及release change相关信息,修改clibs.running的逻辑
This commit is contained in:
@@ -140,10 +140,6 @@ def run_rl(path, params, curves, hr, md, w2t):
|
||||
# 7. 开始采集
|
||||
count = 0
|
||||
while clibs.running:
|
||||
if not clibs.running:
|
||||
w2t("后台数据清零完成,现在可以重新运行之前停止的程序。\n", "red")
|
||||
exit()
|
||||
|
||||
this_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))
|
||||
next_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()+scenario_time+interval+1))
|
||||
w2t(f"[{this_time}] 当前次数:{count:09d} | 预计下次数据更新时间:{next_time}\n", "#008B8B")
|
||||
@@ -157,6 +153,9 @@ def run_rl(path, params, curves, hr, md, w2t):
|
||||
change_curve_state(hr, curves, False, False)
|
||||
# 保留数据并处理输出
|
||||
gen_results(params, curves, start_time, end_time, w2t)
|
||||
else:
|
||||
w2t("后台数据清零完成,现在可以重新运行之前停止的程序。\n", "red")
|
||||
exit()
|
||||
|
||||
|
||||
def gen_results(params, curves, start_time, end_time, w2t):
|
||||
@@ -255,6 +254,7 @@ def main():
|
||||
hr = clibs.c_hr
|
||||
md = clibs.c_md
|
||||
w2t = clibs.w2t
|
||||
clibs.running = 23
|
||||
|
||||
data_dirs, data_files = clibs.traversal_files(path, w2t)
|
||||
params = initialization(path, hr, data_dirs, data_files, interval, curves, w2t)
|
||||
|
||||
Reference in New Issue
Block a user