manager: kill UI when manager failed to start

old-commit-hash: edcee81796f335c87ec15c258f4f551a6fd21c55
This commit is contained in:
Adeeb Shihadeh
2022-02-01 11:06:32 -08:00
parent d7e43473f9
commit e077b5c2ff

View File

@@ -216,6 +216,11 @@ if __name__ == "__main__":
add_file_handler(cloudlog)
cloudlog.exception("Manager failed to start")
try:
managed_processes['ui'].stop()
except Exception:
pass
# Show last 3 lines of traceback
error = traceback.format_exc(-3)
error = "Manager failed to start\n\n" + error