def get_job_id(self, job_specifier): """ get the job_id for job named job_name in the local project path from database Args: job_specifier (str, int): name of the job or job ID Returns: int: job ID of the job """ return get_job_id(database=self.db, sql_query=self.sql_query, user=self.user, project_path=self.project_path, job_specifier=job_specifier)
def refresh_job_status_based_on_queue_status(self, job_specifier, status='running'): """ Check if the job is still listed as running, while it is no longer listed in the queue. Args: job_specifier (str, int): name of the job or job ID status (str): Currently only the jobstatus of 'running' jobs can be refreshed - default='running' """ if status != 'running': raise NotImplementedError() job_id = get_job_id(database=self.db, sql_query=self.sql_query, user=self.user, project_path=self.project_path, job_specifier=job_specifier) self.refresh_job_status_based_on_job_id(job_id)
def get_job_id(self, job_specifier): """ get the job_id for job named job_name in the local project path from database Args: job_specifier (str, int): name of the job or job ID Returns: int: job ID of the job """ if not isinstance(self.db, FileTable): return get_job_id( database=self.db, sql_query=self.sql_query, user=self.user, project_path=self.project_path, job_specifier=job_specifier, ) else: return self.db.get_job_id(job_specifier=job_specifier, project=self.project_path)