def __init__(self, config_path): """ Initialize EmopSubmit object and attributes Args: config_path (str): path to application config file """ super(self.__class__, self).__init__(config_path) self.scheduler = EmopScheduler.get_scheduler_instance(name=self.settings.scheduler, settings=self.settings)
def __init__(self, config_path, proc_id): """ Initialize EmopRun object and attributes Args: config_path (str): path to application config file proc_id (str or int): proc-id of this run """ super(self.__class__, self).__init__(config_path) self.proc_id = proc_id self.payload = EmopPayload(self.settings, proc_id) self.scheduler = EmopScheduler.get_scheduler_instance(name=self.settings.scheduler, settings=self.settings) self.results = {} self.jobs_completed = [] self.jobs_failed = [] self.page_results = [] self.postproc_results = [] self.font_training_results = [] self.extra_transfers = []
def mock_scheduler_slurm(): settings = default_settings() scheduler = EmopScheduler.get_scheduler_instance(name="slurm", settings=settings) return scheduler
def test_get_scheduler_instance_slurm(self): self.settings.scheduler = "slurm" scheduler = EmopScheduler.get_scheduler_instance(name="slurm", settings=self.settings) assert isinstance(scheduler, EmopSLURM), "scheduler is not an instance of EmopSLURM"