mirror of https://github.com/m-labs/artiq.git
master/worker: print short exception info in first log entry of worker error
This commit is contained in:
parent
8b4b269371
commit
de30a4b060
|
@ -221,8 +221,13 @@ def main():
|
||||||
put_object({"action": "completed"})
|
put_object({"action": "completed"})
|
||||||
elif action == "terminate":
|
elif action == "terminate":
|
||||||
break
|
break
|
||||||
except:
|
except Exception as exc:
|
||||||
logging.error("Worker terminating with exception", exc_info=True)
|
short_exc_info = type(exc).__name__
|
||||||
|
exc_str = str(exc)
|
||||||
|
if exc_str:
|
||||||
|
short_exc_info += ": " + exc_str
|
||||||
|
logging.error("Terminating with exception (%s)",
|
||||||
|
short_exc_info, exc_info=True)
|
||||||
finally:
|
finally:
|
||||||
device_mgr.close_devices()
|
device_mgr.close_devices()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue