Skip to content

Commit

Permalink
pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri committed Jun 26, 2024
1 parent 4d9453d commit 54e10d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/protocol_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
3 changes: 2 additions & 1 deletion api/src/opentrons/protocol_runner/run_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
)
Expand Down
5 changes: 0 additions & 5 deletions robot-server/robot_server/runs/engine_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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()
Expand Down

0 comments on commit 54e10d6

Please sign in to comment.