JobStateUpdateHandler
JobStateUpdateHandler is the implementation of the Job State updating service in the DISET framework
The following methods are available in the Service interface
setJobStatus()
- class DIRAC.WorkloadManagementSystem.Service.JobStateUpdateHandler.JobStateUpdateHandler(handlerInitDict, trid)
Bases:
JobStateUpdateHandlerMixin
,RequestHandler
- __init__(handlerInitDict, trid)
Constructor
- Parameters:
handlerInitDict (dictionary) – Information vars for the service
trid (object) – Transport to use
- auth_ping = ['all']
- auth_refreshConfiguration = ['CSAdministrator']
- auth_whoami = ['all']
- static export_echo(data)
This method is used for testing performance of the service
- Parameters:
data (str) – data to be sent back to the caller
- Returns:
S_OK, Value is the input data
- export_ping()
- static export_refreshConfiguration(fromMaster)
Force refreshing the configuration data
- Parameters:
fromMaster (bool) – flag to refresh from the controller configuration service
- classmethod export_sendHeartBeat(jobID, dynamicData, staticData)
Send a heart beat sign of life for a job jobID
- classmethod export_setJobApplicationStatus(jobID, appStatus, source='Unknown')
Set the application status for job specified by its JobId. Internally calling the bulk method
- classmethod export_setJobAttribute(jobID, attribute, value)
Set a job attribute
- classmethod export_setJobFlag(jobID, flag)
Set job flag for job with jobID
- classmethod export_setJobParameter(jobID, name, value)
Set arbitrary parameter specified by name/value pair for job specified by its JobId
- classmethod export_setJobParameters(jobID, parameters)
Set arbitrary parameters specified by a list of name/value pairs for job specified by its JobId
- classmethod export_setJobSite(jobID, site)
Allows the site attribute to be set for a job specified by its jobID.
- classmethod export_setJobStatus(jobID, status='', minorStatus='', source='Unknown', datetime=None, force=False)
Sets the major and minor status for job specified by its JobId. Sets optionally the status date and source component which sends the status information. The “force” flag will override the WMS state machine decision.
- classmethod export_setJobStatusBulk(jobID, statusDict, force=False)
Set various job status fields with a time stamp and a source
- classmethod export_setJobsParameter(jobsParameterDict)
Set arbitrary parameter specified by name/value pair for job specified by its JobId
- classmethod export_unsetJobFlag(jobID, flag)
Unset job flag for job with jobID
- classmethod export_updateJobFromStager(jobID, status)
Simple call back method to be used by the stager.
- export_whoami()
A simple whoami, returns all credential dictionary, except certificate chain object.
- classmethod getCSOption(optionName, defaultValue=False)
Get an option from the CS section of the services
- Returns:
Value for serviceSection/optionName in the CS being defaultValue the default
- getRemoteAddress()
Get the address of the remote peer.
- Returns:
Address of remote peer.
- getRemoteCredentials()
Get the credentials of the remote peer.
- Returns:
Credentials dictionary of remote peer.
- initialize()
Initialize this instance of the handler (to be overwritten)
- classmethod initializeHandler(svcInfoDict)
Determines the switching of ElasticSearch and MySQL backends
- srv_disconnect(trid=None)
- classmethod srv_disconnectClient(trid)
- srv_getActionTuple()
- classmethod srv_getCSOption(optionName, defaultValue=False)
Get an option from the CS section of the services
- Returns:
Value for serviceSection/optionName in the CS being defaultValue the default
- srv_getClientSetup()
- srv_getClientVO()
- srv_getClientVersion()
- srv_getFormattedRemoteCredentials()
- classmethod srv_getMonitor()
- srv_getRemoteAddress()
Get the address of the remote peer.
- Returns:
Address of remote peer.
- srv_getRemoteCredentials()
Get the credentials of the remote peer.
- Returns:
Credentials dictionary of remote peer.
- classmethod srv_getServiceName()
- srv_getTransportID()
- classmethod srv_getURL()
- classmethod srv_msgCreate(msgName)
- srv_msgReply(msgObj)
- classmethod srv_msgSend(trid, msgObj)
- transfer_bulkFromClient(bulkId, token, bulkSize, fileHelper)
- transfer_bulkToClient(bulkId, token, fileHelper)
- transfer_fromClient(fileId, token, fileSize, fileHelper)
- transfer_listBulk(bulkId, token, fileHelper)
- transfer_toClient(fileId, token, fileHelper)
- types_echo = [<class 'str'>]
- types_ping = []
- types_refreshConfiguration = [<class 'bool'>]
- types_sendHeartBeat = [[<class 'str'>, <class 'int'>], <class 'dict'>, <class 'dict'>]
- types_setJobApplicationStatus = [[<class 'str'>, <class 'int'>], <class 'str'>, <class 'str'>]
- types_setJobAttribute = [[<class 'str'>, <class 'int'>], <class 'str'>, <class 'str'>]
- types_setJobFlag = [[<class 'str'>, <class 'int'>], <class 'str'>]
- types_setJobParameter = [[<class 'str'>, <class 'int'>], <class 'str'>, <class 'str'>]
- types_setJobParameters = [[<class 'str'>, <class 'int'>], <class 'list'>]
- types_setJobSite = [[<class 'str'>, <class 'int'>], <class 'str'>]
- types_setJobStatus = [[<class 'str'>, <class 'int'>], <class 'str'>, <class 'str'>, <class 'str'>]
- types_setJobStatusBulk = [[<class 'str'>, <class 'int'>], <class 'dict'>]
- types_setJobsParameter = [<class 'dict'>]
- types_unsetJobFlag = [[<class 'str'>, <class 'int'>], <class 'str'>]
- types_updateJobFromStager = [[<class 'str'>, <class 'int'>], <class 'str'>]
- types_whoami = []
- class DIRAC.WorkloadManagementSystem.Service.JobStateUpdateHandler.JobStateUpdateHandlerMixin
Bases:
object
- classmethod export_sendHeartBeat(jobID, dynamicData, staticData)
Send a heart beat sign of life for a job jobID
- classmethod export_setJobApplicationStatus(jobID, appStatus, source='Unknown')
Set the application status for job specified by its JobId. Internally calling the bulk method
- classmethod export_setJobAttribute(jobID, attribute, value)
Set a job attribute
- classmethod export_setJobFlag(jobID, flag)
Set job flag for job with jobID
- classmethod export_setJobParameter(jobID, name, value)
Set arbitrary parameter specified by name/value pair for job specified by its JobId
- classmethod export_setJobParameters(jobID, parameters)
Set arbitrary parameters specified by a list of name/value pairs for job specified by its JobId
- classmethod export_setJobSite(jobID, site)
Allows the site attribute to be set for a job specified by its jobID.
- classmethod export_setJobStatus(jobID, status='', minorStatus='', source='Unknown', datetime=None, force=False)
Sets the major and minor status for job specified by its JobId. Sets optionally the status date and source component which sends the status information. The “force” flag will override the WMS state machine decision.
- classmethod export_setJobStatusBulk(jobID, statusDict, force=False)
Set various job status fields with a time stamp and a source
- classmethod export_setJobsParameter(jobsParameterDict)
Set arbitrary parameter specified by name/value pair for job specified by its JobId
- classmethod export_unsetJobFlag(jobID, flag)
Unset job flag for job with jobID
- classmethod export_updateJobFromStager(jobID, status)
Simple call back method to be used by the stager.
- classmethod initializeHandler(svcInfoDict)
Determines the switching of ElasticSearch and MySQL backends
- types_sendHeartBeat = [[<class 'str'>, <class 'int'>], <class 'dict'>, <class 'dict'>]
- types_setJobApplicationStatus = [[<class 'str'>, <class 'int'>], <class 'str'>, <class 'str'>]
- types_setJobAttribute = [[<class 'str'>, <class 'int'>], <class 'str'>, <class 'str'>]
- types_setJobFlag = [[<class 'str'>, <class 'int'>], <class 'str'>]
- types_setJobParameter = [[<class 'str'>, <class 'int'>], <class 'str'>, <class 'str'>]
- types_setJobParameters = [[<class 'str'>, <class 'int'>], <class 'list'>]
- types_setJobSite = [[<class 'str'>, <class 'int'>], <class 'str'>]
- types_setJobStatus = [[<class 'str'>, <class 'int'>], <class 'str'>, <class 'str'>, <class 'str'>]
- types_setJobStatusBulk = [[<class 'str'>, <class 'int'>], <class 'dict'>]
- types_setJobsParameter = [<class 'dict'>]
- types_unsetJobFlag = [[<class 'str'>, <class 'int'>], <class 'str'>]
- types_updateJobFromStager = [[<class 'str'>, <class 'int'>], <class 'str'>]