JobStateUpdateClient

class DIRAC.WorkloadManagementSystem.FutureClient.JobStateUpdateClient.JobStateUpdateClient

Bases: FutureClient

sendHeartBeat(jobID: str | int, dynamicData: dict, staticData: dict) DOKReturnType[T] | DErrorReturnType
setJobApplicationStatus(jobID: str | int, appStatus: str, source: str = 'Unknown') DOKReturnType[T] | DErrorReturnType
setJobAttribute(jobID: str | int, attribute: str, value: str) DOKReturnType[T] | DErrorReturnType
setJobFlag(jobID: str | int, flag: str) DOKReturnType[T] | DErrorReturnType
setJobParameter(jobID: str | int, name: str, value: str) DOKReturnType[T] | DErrorReturnType
setJobParameters(jobID: str | int, parameters: list) DOKReturnType[T] | DErrorReturnType
setJobSite(jobID: str | int, site: str) DOKReturnType[T] | DErrorReturnType
setJobStatus(jobID: str | int, status: str = '', minorStatus: str = '', source: str = 'Unknown', datetime_=None, force=False) DOKReturnType[T] | DErrorReturnType
setJobStatusBulk(jobID: str | int, statusDict: dict, force=False) DOKReturnType[T] | DErrorReturnType
setJobsParameter(jobsParameterDict: dict) DOKReturnType[T] | DErrorReturnType
unsetJobFlag(jobID: str | int, flag: str) DOKReturnType[T] | DErrorReturnType
updateJobFromStager(jobID: str | int, status: str)
DIRAC.WorkloadManagementSystem.FutureClient.JobStateUpdateClient.stripValueIfOK(func)

Decorator to remove S_OK[“Value”] from the return value of a function if it is OK.

This is done as some update functions return the number of modified rows in the database. This likely not actually useful so it isn’t supported in DiracX. Stripping the “Value” key of the dictionary means that we should get a fairly straight forward error if the assumption is incorrect.