def __init__(self, app: MinimalManagerApp): self.app = app self.job_lock = False if self.app.is_job_handler: log.debug("Initializing job handler") self.job_handler = handler.JobHandler(app) else: self.job_handler = NoopHandler() self.__check_jobs_at_startup()
def __init__(self, app): self.app = app if self.app.is_job_handler(): log.debug("Starting job handler") self.job_handler = handler.JobHandler(app) self.job_queue = self.job_handler.job_queue self.job_stop_queue = self.job_handler.job_stop_queue else: self.job_handler = NoopHandler() self.job_queue = self.job_stop_queue = NoopQueue() self.job_lock = False
def __init__(self, app): self.app = app if (self.app.config.track_jobs_in_database and self.app.job_config.is_handler(self.app.config.server_name) ) or not self.app.config.track_jobs_in_database: log.debug("Starting job handler") self.job_handler = handler.JobHandler(app) self.job_queue = self.job_handler.job_queue self.job_stop_queue = self.job_handler.job_stop_queue else: self.job_handler = NoopHandler() self.job_queue = self.job_stop_queue = NoopQueue() self.job_lock = False
def __init__(self, app): self.app = app self.job_lock = False if self.app.is_job_handler: log.debug("Initializing job handler") self.job_handler = handler.JobHandler(app) self.job_stop_queue = self.job_handler.job_stop_queue elif app.application_stack.has_pool( app.application_stack.pools.JOB_HANDLERS): log.debug("Initializing job handler messaging interface") self.job_handler = MessageJobHandler(app) self.job_stop_queue = NoopQueue() else: self.job_handler = NoopHandler() self.job_stop_queue = NoopQueue() self.job_queue = self.job_handler.job_queue
def __init__( self, app ): self.app = app self.job_handler = NoopHandler() if self.app.config.server_name in self.app.config.job_handlers: self.job_handler = handler.JobHandler( app ) if self.app.config.server_name == self.app.config.job_manager: job_handler = NoopHandler() # In the case that webapp == manager == handler, pass jobs in memory if not self.app.config.track_jobs_in_database: job_handler = self.job_handler # Otherwise, even if the manager == one of the handlers, its handler will pick up jobs from the database self.job_queue = JobManagerQueue( app, job_handler ) self.job_stop_queue = JobManagerStopQueue( app, job_handler ) if self.app.config.enable_beta_job_managers: from galaxy.jobs.deferred import DeferredJobQueue self.deferred_job_queue = DeferredJobQueue( app ) else: self.job_queue = self.job_stop_queue = NoopQueue() self.job_handler.start()
def start(self): if self.app.is_job_handler: log.debug("Initializing job handler") self.job_handler = handler.JobHandler(self.app) self.job_handler.start()