JobStatusUtility

Utility to set the job status in the jobDB

class DIRAC.WorkloadManagementSystem.Utilities.JobStatusUtility.JobStatusUtility(jobDB: JobDB = None, jobLoggingDB: JobLoggingDB = None, elasticJobParametersDB: ElasticJobParametersDB = None)

Bases: object

__init__(jobDB: JobDB = None, jobLoggingDB: JobLoggingDB = None, 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

DIRAC.WorkloadManagementSystem.Utilities.JobStatusUtility.getNewStatus(jobID: int, updateTimes: list[datetime], lastTime: datetime, statusDict: dict[datetime, Any], currentStatus, force: bool, log)
DIRAC.WorkloadManagementSystem.Utilities.JobStatusUtility.getStartAndEndTime(startTime, endTime, updateTimes, timeStamps, statusDict)