forked from M-Labs/artiq
1
0
Fork 0

worker_impl - try/catch for exceptions in notify_run_end to avoid data loss

This commit is contained in:
Charles Baynham 2024-02-26 16:23:16 +00:00 committed by Sebastien Bourdeauducq
parent 6c28159541
commit 240b238cac
1 changed files with 7 additions and 1 deletions

View File

@ -362,7 +362,13 @@ def main():
write_results() write_results()
raise raise
finally: finally:
device_mgr.notify_run_end() try:
device_mgr.notify_run_end()
except:
# Also write results immediately if the `notify_run_end`
# callbacks produce an exception
write_results()
raise
put_completed() put_completed()
elif action == "analyze": elif action == "analyze":
try: try: