diff --git a/unilabos/devices/workstation/bioyond_studio/dispensing_station.py b/unilabos/devices/workstation/bioyond_studio/dispensing_station.py index a55a49c..18237a5 100644 --- a/unilabos/devices/workstation/bioyond_studio/dispensing_station.py +++ b/unilabos/devices/workstation/bioyond_studio/dispensing_station.py @@ -1299,6 +1299,21 @@ class BioyondDispensingStation(BioyondWorkstation): 'actualVolume': actual_volume } + def scheduler_start(self) -> dict: + """启动调度器 - 启动Bioyond工作站的任务调度器,开始执行队列中的任务 + + Returns: + dict: 包含return_info的字典,return_info为整型(1=成功, 0=失败) + """ + try: + result = self.hardware_interface.scheduler_start() + self.hardware_interface._logger.info(f"调度器启动结果: {result}") + return {"return_info": result} + except Exception as e: + error_msg = f"启动调度器失败: {str(e)}" + self.hardware_interface._logger.error(error_msg) + return {"return_info": 0, "error": error_msg} + # 等待多个任务完成并获取实验报告 def wait_for_multiple_orders_and_get_reports(self, batch_create_result: str = None, diff --git a/unilabos/devices/workstation/bioyond_studio/reaction_station.py b/unilabos/devices/workstation/bioyond_studio/reaction_station.py index 2884172..bea8572 100644 --- a/unilabos/devices/workstation/bioyond_studio/reaction_station.py +++ b/unilabos/devices/workstation/bioyond_studio/reaction_station.py @@ -97,6 +97,21 @@ class BioyondReactionStation(BioyondWorkstation): print(f"当前队列长度: {len(self.pending_task_params)}") return json.dumps({"suc": True}) + def scheduler_start(self) -> dict: + """启动调度器 - 启动Bioyond工作站的任务调度器,开始执行队列中的任务 + + Returns: + dict: 包含return_info的字典,return_info为整型(1=成功, 0=失败) + """ + try: + result = self.hardware_interface.scheduler_start() + self.hardware_interface._logger.info(f"调度器启动结果: {result}") + return {"return_info": result} + except Exception as e: + error_msg = f"启动调度器失败: {str(e)}" + self.hardware_interface._logger.error(error_msg) + return {"return_info": 0, "error": error_msg} + def reactor_taken_in( self, assign_material_name: str,