manager: remove restarter (#38566)

This commit is contained in:
Adeeb Shihadeh
2026-08-07 11:56:48 -07:00
committed by GitHub
parent be191eb8ac
commit 03803d0c82
2 changed files with 2 additions and 11 deletions
+1 -10
View File
@@ -68,16 +68,11 @@ class ManagerProcess(ABC):
enabled = True
name = ""
shutting_down = False
restart_if_crash = False
@abstractmethod
def start(self) -> None:
pass
def restart(self) -> None:
self.stop(sig=signal.SIGKILL)
self.start()
def stop(self, retry: bool = True, block: bool = True, sig: signal.Signals | None = None) -> int | None:
if self.proc is None:
return None
@@ -162,14 +157,13 @@ class NativeProcess(ManagerProcess):
class PythonProcess(ManagerProcess):
def __init__(self, name, module, should_run, enabled=True, sigkill=False, restart_if_crash=False):
def __init__(self, name, module, should_run, enabled=True, sigkill=False):
self.name = name
self.module = module
self.should_run = should_run
self.enabled = enabled
self.sigkill = sigkill
self.launcher = launcher
self.restart_if_crash = restart_if_crash
def start(self) -> None:
# In case we only tried a non blocking stop we need to stop it before restarting
@@ -236,9 +230,6 @@ def ensure_running(procs: ValuesView[ManagerProcess], started: bool, params: Par
running = []
for p in procs:
if p.enabled and p.name not in not_run and p.should_run(started, params, CP):
if p.restart_if_crash and p.proc is not None and not p.proc.is_alive():
cloudlog.error(f'Restarting {p.name} (exitcode {p.proc.exitcode})')
p.restart()
running.append(p)
else:
p.stop(block=False)
+1 -1
View File
@@ -89,7 +89,7 @@ procs = [
PythonProcess("dmonitoringmodeld", "openpilot.selfdrive.modeld.dmonitoringmodeld", driverview, enabled=(WEBCAM or not PC)),
PythonProcess("sensord", "openpilot.system.sensord.sensord", only_onroad, enabled=not PC),
PythonProcess("ui", "openpilot.selfdrive.ui.ui", always_run, restart_if_crash=True),
PythonProcess("ui", "openpilot.selfdrive.ui.ui", always_run),
PythonProcess("soundd", "openpilot.selfdrive.ui.soundd", driverview),
PythonProcess("locationd", "openpilot.selfdrive.locationd.locationd", only_onroad),
NativeProcess("_pandad", "openpilot/selfdrive/pandad", ["./pandad"], always_run, enabled=False),