continue hour loop on restart

This commit is contained in:
j 2022-01-26 09:31:02 +00:00
parent bef291d32d
commit 8934e8c3e2

View File

@ -266,6 +266,12 @@ def main():
print('listening on http://%s:%s/' % (ADDRESS, PORT))
app.listen(PORT, ADDRESS)
if os.path.exists('last_run.json'):
with open('last_run.json', 'r') as fd:
data = json.load(fd)
if data and data.get('hour_loop'):
ctl.put(data)
main = IOLoop.instance()
try:
main.start()