use usr1 to trigger refresh (?)
This commit is contained in:
@@ -117,13 +117,14 @@ def check_tree():
|
|||||||
|
|
||||||
|
|
||||||
def check_dwl_data(*args):
|
def check_dwl_data(*args):
|
||||||
|
print("SIGUSR1")
|
||||||
global dwl_timestamp
|
global dwl_timestamp
|
||||||
timestamp = datetime.now()
|
timestamp = datetime.now()
|
||||||
diff = (timestamp - dwl_timestamp).total_seconds() * 1000
|
diff = (timestamp - dwl_timestamp).total_seconds() * 1000
|
||||||
if diff > 50:
|
if diff > 50:
|
||||||
common.dwl_data = load_json(common.dwl_data_file)
|
common.dwl_data = load_json(common.dwl_data_file)
|
||||||
if common.dwl_data:
|
if common.dwl_data:
|
||||||
print(common.dwl_data, diff)
|
print(diff)
|
||||||
for item in common.dwl_instances:
|
for item in common.dwl_instances:
|
||||||
item.refresh(common.dwl_data)
|
item.refresh(common.dwl_data)
|
||||||
dwl_timestamp = datetime.now()
|
dwl_timestamp = datetime.now()
|
||||||
|
Reference in New Issue
Block a user