We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b64cea0 commit 72da5ccCopy full SHA for 72da5cc
artiq/gui/state.py
@@ -71,13 +71,14 @@ def save(self):
71
72
async def _do(self):
73
try:
74
- while True:
75
- await asyncio.sleep(self.autosave_period)
+ try:
+ while True:
76
+ await asyncio.sleep(self.autosave_period)
77
+ self.save()
78
+ finally:
79
self.save()
80
except asyncio.CancelledError:
81
pass
82
except:
83
logger.error("Uncaught exception attempting to save state",
84
exc_info=True)
- finally:
- self.save()
0 commit comments