修复两处bug

修复两处bug
This commit is contained in:
huoji
2022-10-08 16:52:27 +08:00
parent 0447387079
commit c8292cf977
2 changed files with 3 additions and 0 deletions

View File

@@ -30,6 +30,8 @@ def update_loged_num(host):
}
host_list[host]['all_log_num'] += 1
if time.time() - host_list[host]['last_update_time'] > 60:
if host_list[host]['all_log_num'] == 0:
del host_list[host]
host_list[host]['last_update_time'] = time.time()
host_list[host]['log_num'].append(host_list[host]['all_log_num'])
host_list[host]['all_log_num'] = 0