Skip to content

Commit 7a12214

Browse files
committed
use create_run_orchestrator
1 parent dd21d85 commit 7a12214

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

api/src/opentrons/execute.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -631,28 +631,13 @@ async def run(protocol_source: ProtocolSource) -> None:
631631
load_fixed_trash=should_load_fixed_trash(protocol_source.config),
632632
)
633633

634-
protocol_runner = create_protocol_runner(
635-
protocol_config=protocol_source.config,
636-
protocol_engine=protocol_engine,
637-
hardware_api=hardware_api_wrapped,
638-
)
639-
640-
orchestrator = RunOrchestrator(
634+
orchestrator = RunOrchestrator.build_orchestrator(
641635
hardware_api=hardware_api_wrapped,
642636
protocol_engine=protocol_engine,
643-
json_or_python_protocol_runner=protocol_runner,
644-
fixit_runner=LiveRunner(
645-
protocol_engine=protocol_engine, hardware_api=hardware_api_wrapped
646-
),
647-
setup_runner=LiveRunner(
648-
protocol_engine=protocol_engine, hardware_api=hardware_api_wrapped
649-
),
650-
protocol_live_runner=LiveRunner(
651-
protocol_engine=protocol_engine, hardware_api=hardware_api_wrapped
652-
),
637+
protocol_config=protocol_source.config,
653638
)
654639

655-
unsubscribe = protocol_runner.broker.subscribe(
640+
unsubscribe = orchestrator.get_protocol_runner().broker.subscribe(
656641
"command", lambda event: emit_runlog(event) if emit_runlog else None
657642
)
658643
try:

0 commit comments

Comments
 (0)