use usr1 to trigger refresh (?)

This commit is contained in:
Piotr Miller
2021-10-26 15:39:59 +02:00
parent bc8ba82905
commit b9f20075d9

View File

@@ -117,13 +117,14 @@ def check_tree():
def check_dwl_data(*args):
print("SIGUSR1")
global dwl_timestamp
timestamp = datetime.now()
diff = (timestamp - dwl_timestamp).total_seconds() * 1000
if diff > 50:
common.dwl_data = load_json(common.dwl_data_file)
if common.dwl_data:
print(common.dwl_data, diff)
print(diff)
for item in common.dwl_instances:
item.refresh(common.dwl_data)
dwl_timestamp = datetime.now()