forked from M-Labs/artiq
gui: do 60114447
properly
This commit is contained in:
parent
010c68f0a1
commit
059aa2f83e
|
@ -70,14 +70,15 @@ class StateManager(TaskObject):
|
||||||
pyon.store_file(self.filename, data)
|
pyon.store_file(self.filename, data)
|
||||||
|
|
||||||
async def _do(self):
|
async def _do(self):
|
||||||
|
try:
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
await asyncio.sleep(self.autosave_period)
|
await asyncio.sleep(self.autosave_period)
|
||||||
self.save()
|
self.save()
|
||||||
|
finally:
|
||||||
|
self.save()
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
pass
|
pass
|
||||||
except:
|
except:
|
||||||
logger.error("Uncaught exception attempting to save state",
|
logger.error("Uncaught exception attempting to save state",
|
||||||
exc_info=True)
|
exc_info=True)
|
||||||
finally:
|
|
||||||
self.save()
|
|
||||||
|
|
Loading…
Reference in New Issue