JobStatusUtility
Utility to set the job status in the jobDB
- class DIRAC.WorkloadManagementSystem.Utilities.JobStatusUtility.JobStatusUtility(jobDB: Optional[DIRAC.WorkloadManagementSystem.DB.JobDB.JobDB] = None, jobLoggingDB: Optional[DIRAC.WorkloadManagementSystem.DB.JobLoggingDB.JobLoggingDB] = None, elasticJobParametersDB: Optional[DIRAC.WorkloadManagementSystem.DB.ElasticJobParametersDB.ElasticJobParametersDB] = None)
Bases:
object
- __init__(jobDB: Optional[DIRAC.WorkloadManagementSystem.DB.JobDB.JobDB] = None, jobLoggingDB: Optional[DIRAC.WorkloadManagementSystem.DB.JobLoggingDB.JobLoggingDB] = None, elasticJobParametersDB: Optional[DIRAC.WorkloadManagementSystem.DB.ElasticJobParametersDB.ElasticJobParametersDB] = None) None
- Raises
RuntimeError, AttributeError
- setJobStatus(jobID: int, status=None, minorStatus=None, appStatus=None, source=None, dateTime=None, force=False)
Update the job provided statuses (major, minor and application) If sets also the source and the time stamp (or current time) This method calls the bulk method internally
- setJobStatusBulk(jobID: int, statusDict: dict, force: bool = False)
Set various status fields for job specified by its jobId. Set only the last status in the JobDB, updating all the status logging information in the JobLoggingDB. The statusDict has dateTime as a key and status information dictionary as values