diff --git a/src/app_runtime/core/runtime.py b/src/app_runtime/core/runtime.py index aaad5e0..28f52d0 100644 --- a/src/app_runtime/core/runtime.py +++ b/src/app_runtime/core/runtime.py @@ -47,7 +47,7 @@ class RuntimeManager: self.configuration.add_provider(provider) return provider - def start(self) -> None: + def start(self, *, start_control_plane: bool = True) -> None: if self._started: return self._state = LifecycleState.STARTING @@ -56,7 +56,8 @@ class RuntimeManager: self._register_health_contributors() self._register_workers() self.workers.start() - self.control_plane.start(self) + if start_control_plane: + self.control_plane.start(self) self._started = True self._refresh_state() @@ -84,7 +85,7 @@ class RuntimeManager: async def start_runtime(self) -> str: if self._started: return "runtime already running" - self.start() + self.start(start_control_plane=False) return "runtime started" async def stop_runtime(self) -> str: