From 54e10d6705e69bfa156cdddb2ef08f6fda82fb09 Mon Sep 17 00:00:00 2001 From: tamarzanzouri Date: Wed, 26 Jun 2024 16:16:19 -0400 Subject: [PATCH] pr fixes --- api/src/opentrons/protocol_engine/protocol_engine.py | 2 +- api/src/opentrons/protocol_runner/run_orchestrator.py | 3 ++- robot-server/robot_server/runs/engine_store.py | 5 ----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/api/src/opentrons/protocol_engine/protocol_engine.py b/api/src/opentrons/protocol_engine/protocol_engine.py index 04fa53973b3..037d846a4e2 100644 --- a/api/src/opentrons/protocol_engine/protocol_engine.py +++ b/api/src/opentrons/protocol_engine/protocol_engine.py @@ -623,7 +623,7 @@ def _code_in_error_tree( for wrapped_error in root_error.wrapping ) - def set_queue_worker_command_generator( + def set_and_start_queue_worker( self, command_generator: Callable[[], AsyncGenerator[str, None]] ) -> None: """Set QueueWorker and start it.""" diff --git a/api/src/opentrons/protocol_runner/run_orchestrator.py b/api/src/opentrons/protocol_runner/run_orchestrator.py index 2da1f6256f3..b6448a799e5 100644 --- a/api/src/opentrons/protocol_runner/run_orchestrator.py +++ b/api/src/opentrons/protocol_runner/run_orchestrator.py @@ -90,7 +90,7 @@ def __init__( self._protocol_live_runner = protocol_live_runner self._fixit_runner.prepare() self._setup_runner.prepare() - self._protocol_engine.set_queue_worker_command_generator(self.command_generator) + self._protocol_engine.set_and_start_queue_worker(self.command_generator) @property def run_id(self) -> str: @@ -347,6 +347,7 @@ async def command_generator(self) -> AsyncGenerator[str, None]: """Yield next command to execute.""" while True: try: + # TODO(tz, 6-26-2024): avoid using private accessor in a follow up pr. command_id = await self._protocol_engine._state_store.wait_for( condition=self._protocol_engine.state_view.commands.get_next_to_execute ) diff --git a/robot-server/robot_server/runs/engine_store.py b/robot-server/robot_server/runs/engine_store.py index ff4092ce5ce..f7aa92ad4f9 100644 --- a/robot-server/robot_server/runs/engine_store.py +++ b/robot-server/robot_server/runs/engine_store.py @@ -205,9 +205,6 @@ async def create( else: load_fixed_trash = False - post_run_hardware_state = PostRunHardwareState.HOME_AND_STAY_ENGAGED - drop_tips_after_run = True - if self._run_orchestrator is not None: raise EngineConflictError("Another run is currently active.") engine = await create_protocol_engine( @@ -229,8 +226,6 @@ async def create( protocol_engine=engine, hardware_api=self._hardware_api, protocol_config=protocol.source.config if protocol else None, - post_run_hardware_state=post_run_hardware_state, - drop_tips_after_run=drop_tips_after_run, ) runner = self.run_orchestrator.get_protocol_runner()