添加run_protocol参数

This commit is contained in:
q434343
2026-03-31 16:11:11 +08:00
parent ad66fc1841
commit a48985720c
2 changed files with 14 additions and 8 deletions

View File

@@ -1064,8 +1064,8 @@ class PRCXI9300Handler(LiquidHandlerAbstract):
): ):
self._unilabos_backend.create_protocol(protocol_name) self._unilabos_backend.create_protocol(protocol_name)
async def run_protocol(self): async def run_protocol(self, protocol_id: str = None):
return self._unilabos_backend.run_protocol() return self._unilabos_backend.run_protocol(protocol_id)
async def remove_liquid( async def remove_liquid(
self, self,
@@ -1559,12 +1559,15 @@ class PRCXI9300Backend(LiquidHandlerBackend):
raise AssertionError(f"Failed to create matrix: {res.get('Message', 'Unknown error')}") raise AssertionError(f"Failed to create matrix: {res.get('Message', 'Unknown error')}")
print(f"PRCXI9300Backend created matrix with ID: {self.matrix_info['MatrixId']}, result: {res}") print(f"PRCXI9300Backend created matrix with ID: {self.matrix_info['MatrixId']}, result: {res}")
def run_protocol(self): def run_protocol(self, protocol_id: str = None):
assert self.is_reset_ok, "PRCXI9300Backend is not reset successfully. Please call setup() first." assert self.is_reset_ok, "PRCXI9300Backend is not reset successfully. Please call setup() first."
run_time = time.time() run_time = time.time()
solution_id = self.api_client.add_solution( if protocol_id == "" or protocol_id is None:
f"protocol_{run_time}", self.matrix_id, self.steps_todo_list solution_id = self.api_client.add_solution(
) f"protocol_{run_time}", self.matrix_id, self.steps_todo_list
)
else:
solution_id = protocol_id
print(f"PRCXI9300Backend created solution with ID: {solution_id}") print(f"PRCXI9300Backend created solution with ID: {solution_id}")
self.api_client.load_solution(solution_id) self.api_client.load_solution(solution_id)
print(json.dumps(self.steps_todo_list, indent=2)) print(json.dumps(self.steps_todo_list, indent=2))

View File

@@ -7779,7 +7779,8 @@ liquid_handler.prcxi:
auto-run_protocol: auto-run_protocol:
feedback: {} feedback: {}
goal: {} goal: {}
goal_default: {} goal_default:
protocol_id: null
handles: {} handles: {}
placeholder_keys: {} placeholder_keys: {}
result: {} result: {}
@@ -7788,7 +7789,9 @@ liquid_handler.prcxi:
properties: properties:
feedback: {} feedback: {}
goal: goal:
properties: {} properties:
protocol_id:
type: string
required: [] required: []
type: object type: object
result: {} result: {}