fix: create batch after 20 minutes
This commit is contained in:
parent
015e8e38b5
commit
2b79a13a8c
|
@ -1024,7 +1024,7 @@ def create_update_task(modbus, dbus, batteries, signals, csv_signals, main_loop)
|
||||||
ALLOW = True
|
ALLOW = True
|
||||||
alive = update(modbus, batteries, dbus, signals, csv_signals)
|
alive = update(modbus, batteries, dbus, signals, csv_signals)
|
||||||
elapsed_time = time.time() - start_time
|
elapsed_time = time.time() - start_time
|
||||||
if elapsed_time >= 60:
|
if elapsed_time >= 1200:
|
||||||
create_batch_of_csv_files()
|
create_batch_of_csv_files()
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
#alive = update_for_testing(modbus, batteries, dbus, signals, csv_signals)
|
#alive = update_for_testing(modbus, batteries, dbus, signals, csv_signals)
|
||||||
|
|
|
@ -550,7 +550,7 @@ def create_update_task(modbus, service, batteries):
|
||||||
create_csv_files(csv_signals, statuses, node_numbers, alarms_number_list, warnings_number_list)
|
create_csv_files(csv_signals, statuses, node_numbers, alarms_number_list, warnings_number_list)
|
||||||
|
|
||||||
num_files_in_csv_dir = count_files_in_folder(CSV_DIR)
|
num_files_in_csv_dir = count_files_in_folder(CSV_DIR)
|
||||||
if elapsed_time >= 60:
|
if elapsed_time >= 1200:
|
||||||
create_batch_of_csv_files()
|
create_batch_of_csv_files()
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue