manager: log exit reason (#23532)

old-commit-hash: 308a6f1730d7347f530ad56aa609e47d8c5bf266
This commit is contained in:
Adeeb Shihadeh
2022-01-14 08:55:51 -08:00
committed by GitHub
parent a2caf11b9f
commit ccf91380f2
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -131,6 +131,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"JoystickDebugMode", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_OFF},
{"LastAthenaPingTime", CLEAR_ON_MANAGER_START},
{"LastGPSPosition", PERSISTENT},
{"LastManagerExitReason", CLEAR_ON_MANAGER_START},
{"LastPeripheralPandaType", PERSISTENT},
{"LastPowerDropDetected", CLEAR_ON_MANAGER_START},
{"LastSystemShutdown", CLEAR_ON_MANAGER_START},
+2 -1
View File
@@ -166,8 +166,9 @@ def manager_thread() -> None:
shutdown = False
for param in ("DoUninstall", "DoShutdown", "DoReboot"):
if params.get_bool(param):
cloudlog.warning(f"Shutting down manager - {param} set")
shutdown = True
params.put("LastManagerExitReason", param)
cloudlog.warning(f"Shutting down manager - {param} set")
if shutdown:
break