continue hour loop on restart
This commit is contained in:
parent
bef291d32d
commit
8934e8c3e2
|
@ -266,6 +266,12 @@ def main():
|
||||||
print('listening on http://%s:%s/' % (ADDRESS, PORT))
|
print('listening on http://%s:%s/' % (ADDRESS, PORT))
|
||||||
app.listen(PORT, ADDRESS)
|
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()
|
main = IOLoop.instance()
|
||||||
try:
|
try:
|
||||||
main.start()
|
main.start()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user