def __init__(self, channel_manager, plate_manager):
        """
        Initialise the workflow object
        :param channel_manager: The channel manager
        :param plate_manager: The plate manager
        """
        self.channel_manager = channel_manager
        self.plate_manager = plate_manager

        self.workflows = FrozenKeyDict()
        self.uncommitted_workflows = set()

        with switch_db(WorkflowDefinitionModel, db_alias='hyperstream'):
            for workflow_definition in WorkflowDefinitionModel.objects():
                try:
                    self.load_workflow(workflow_definition.workflow_id)
                except (StreamNotFoundError, ToolInitialisationError, ToolNotFoundError, IncompatibleToolError) as e:
                    logging.warn(str(e))
def __init__ ( self , channel_manager , plate_manager ) : self . channel_manager = channel_manager self . plate_manager = plate_manager self . workflows = FrozenKeyDict ( ) self . uncommitted_workflows = set ( ) with switch_db ( WorkflowDefinitionModel , db_alias = 'hyperstream' ) : for workflow_definition in WorkflowDefinitionModel . objects ( ) : try : self . load_workflow ( workflow_definition . workflow_id ) except ( StreamNotFoundError , ToolInitialisationError , ToolNotFoundError , IncompatibleToolError ) as e : logging . warn ( str ( e ) )
Initialise the workflow object
        :param channel_manager: The channel manager
        :param plate_manager: The plate manager