mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Clean up scheduler code
Use more standard way of scheduling
This commit is contained in:
parent
3da45c8a08
commit
d304b60f16
@ -32,15 +32,9 @@ if __name__ == '__main__':
|
||||
importAndShapeFullReload()
|
||||
schedule.every().day.at("04:00").do(importAndShapeFullReload)
|
||||
schedule.every(30).minutes.do(importAndShapePartialReload)
|
||||
if influxDBEnabled:
|
||||
schedule.every(10).seconds.do(refreshBandwidthGraphs)
|
||||
schedule.every(45).seconds.do(refreshLatencyGraphs)
|
||||
while True:
|
||||
schedule.run_pending()
|
||||
if influxDBEnabled:
|
||||
try:
|
||||
for i in range(3):
|
||||
refreshBandwidthGraphs()
|
||||
time.sleep(10)
|
||||
refreshLatencyGraphs()
|
||||
except:
|
||||
print("Failed to update graphs")
|
||||
else:
|
||||
time.sleep(60)
|
||||
time.sleep(1)
|
||||
|
Loading…
Reference in New Issue
Block a user