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: DIRAC.Core.DISET.RequestHandler.RequestHandler

exception ConnectionError(msg)

Bases: exceptions.Exception

__init__(msg)

x.__init__(…) initializes x; see help(type(x)) for signature

args
message
__init__(handlerInitDict, trid)

Constructor

Parameters:
  • handlerInitDict (dictionary) – Information vars for the service
  • trid (object) – Transport to use
auth_ping = ['all']
static export_echo(data)

This method used for testing the performance of a service

export_ping()
export_sendHeartBeat(jobID, dynamicData, staticData)

Send a heart beat sign of life for a job jobID

export_setJobApplicationStatus(jobID, appStatus, source='Unknown')

Set the application status for job specified by its JobId.

export_setJobFlag(jobID, flag)

Set job flag for job with jobID

export_setJobParameter(jobID, name, value)

Set arbitrary parameter specified by name/value pair for job specified by its JobId

export_setJobParameters(jobID, parameters)

Set arbitrary parameters specified by a list of name/value pairs for job specified by its JobId

export_setJobSite(jobID, site)

Allows the site attribute to be set for a job specified by its jobID.

export_setJobStatus(jobID, status, minorStatus, source='Unknown', datetime=None)

Set the major and minor status for job specified by its JobId. Set optionally the status date and source component which sends the status information.

export_setJobStatusBulk(jobID, statusDict)

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

export_setJobsParameter(jobsParameterDict)

Set arbitrary parameter specified by name/value pair for job specified by its JobId

export_setJobsStatus(jobIDs, status, minorStatus, source='Unknown', datetime=None)

Set the major and minor status for job specified by its JobId. Set optionally the status date and source component which sends the status information.

export_unsetJobFlag(jobID, flag)

Unset job flag for job with jobID

export_updateJobFromStager(jobID, status)

Simple call back method to be used by the stager.

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)

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_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 = [<type 'basestring'>]
types_ping = []
types_sendHeartBeat = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'dict'>, <type 'dict'>]
types_setJobApplicationStatus = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>, <type 'basestring'>]
types_setJobFlag = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
types_setJobParameter = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>, <type 'basestring'>]
types_setJobParameters = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'list'>]
types_setJobSite = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
types_setJobStatus = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>, <type 'basestring'>, <type 'basestring'>]
types_setJobStatusBulk = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'dict'>]
types_setJobsParameter = [<type 'dict'>]
types_setJobsStatus = [<type 'list'>, <type 'basestring'>, <type 'basestring'>, <type 'basestring'>]
types_unsetJobFlag = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
types_updateJobFromStager = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
DIRAC.WorkloadManagementSystem.Service.JobStateUpdateHandler.initializeJobStateUpdateHandler(serviceInfo)