diff --git a/api/src/opentrons/protocol_runner/run_orchestrator.py b/api/src/opentrons/protocol_runner/run_orchestrator.py index 8e03b6c6738..4fbab9cf654 100644 --- a/api/src/opentrons/protocol_runner/run_orchestrator.py +++ b/api/src/opentrons/protocol_runner/run_orchestrator.py @@ -27,12 +27,12 @@ class RunOrchestrator: def __init__( self, - run_id: str, protocol_engine: ProtocolEngine, hardware_api: HardwareControlAPI, fixit_runner: protocol_runner.AnyRunner, setup_runner: protocol_runner.AnyRunner, json_or_python_protocol_runner: Optional[protocol_runner.AnyRunner] = None, + run_id: Optional[str] = None, ): self.run_id = run_id self._protocol_engine = protocol_engine @@ -44,7 +44,6 @@ def __init__( @classmethod def build_orchestrator( cls, - run_id:Optional[str], protocol_engine: ProtocolEngine, hardware_api: HardwareControlAPI, protocol_config: Optional[ @@ -52,6 +51,7 @@ def build_orchestrator( ] = None, post_run_hardware_state: PostRunHardwareState = PostRunHardwareState.HOME_AND_STAY_ENGAGED, drop_tips_after_run: bool = True, + run_id: Optional[str] = None, ) -> "RunOrchestrator": setup_runner = protocol_runner.create_protocol_runner( protocol_engine=protocol_engine, @@ -120,7 +120,6 @@ def add_command( ): return self._json_or_python_runner.set_command_queued(request) - # TODO(tz, 2024-5-13): what runner should we return? def get_protocol_runner(self) -> protocol_runner.AnyRunner: return self._json_or_python_runner or self._setup_runner diff --git a/robot-server/robot_server/runs/engine_store.py b/robot-server/robot_server/runs/engine_store.py index 78334c27685..0779e4e6ead 100644 --- a/robot-server/robot_server/runs/engine_store.py +++ b/robot-server/robot_server/runs/engine_store.py @@ -121,7 +121,7 @@ def __init__( self._hardware_api = hardware_api self._robot_type = robot_type self._deck_type = deck_type - # self._default_engine: Optional[ProtocolEngine] = None + self._default_engine: Optional[ProtocolEngine] = None # self._runner_engine_pair: Optional[RunnerEnginePair] = None hardware_api.register_callback(_get_estop_listener(self)) @@ -182,13 +182,13 @@ async def get_default_engine(self) -> ProtocolEngine: block_on_door_open=False, ), ) - # if we are doing this we probably need a lock on _run_orchestrator - self._run_orchestrator = RunOrchestrator.build_orchestrator( - run_id="initial-engine", - protocol_engine=engine, - hardware_api=self._hardware_api, - ) - return self._run_orchestrator.get_protocol_engine() + self._default_engine = engine + # # if we are doing this we probably need a lock on _run_orchestrator + # self._run_orchestrator = RunOrchestrator.build_orchestrator( + # protocol_engine=engine, + # hardware_api=self._hardware_api, + # ) + return engine async def create( self,