JobMonitoringHandler

JobMonitoringHandler is the implementation of the JobMonitoring service in the DISET framework

The following methods are available in the Service interface

class DIRAC.WorkloadManagementSystem.Service.JobMonitoringHandler.JobMonitoringHandler(handlerInitDict, trid)

Bases: JobMonitoringHandlerMixin, 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

classmethod export_getInputData(jobID)

Get input data for the specified jobs

classmethod export_getJobAttribute(jobID, attribute)
Parameters:
  • jobID (int) – one single Job ID

  • attribute (str) – one single attribute name

classmethod export_getJobAttributes(jobID, attrList=None)
Parameters:
  • jobID (int) – one single Job ID

  • attrList (list) – optional list of attributes

classmethod export_getJobHeartBeatData(jobID)
classmethod export_getJobJDL(jobID, original)
classmethod export_getJobLoggingInfo(jobID)
export_getJobParameter(jobID, parName)
Parameters:
  • jobID (str/int) – one single Job ID

  • parName (str) – one single parameter name

export_getJobParameters(jobIDs, parName=None)
Parameters:
  • jobIDs (str/int/list) – one single job ID or a list of them

  • parName (str) – one single parameter name, or None (meaning all of them)

classmethod export_getJobSummary(jobID)
classmethod export_getJobs(attrDict=None, cutDate=None)

Return list of JobIds matching the condition given in attrDict

classmethod export_getJobsApplicationStatus(jobIDs)
classmethod export_getJobsMinorStatus(jobIDs)
classmethod export_getJobsSites(jobIDs)
classmethod export_getJobsStates(jobIDs)
classmethod export_getJobsStatus(jobIDs)
classmethod export_getJobsSummary(jobIDs)
export_ping()
static export_refreshConfiguration(fromMaster)

Force refreshing the configuration data

Parameters:

fromMaster (bool) – flag to refresh from the controller configuration service

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

classmethod getJobsAttributes(*args, **kwargs)

Utility function for unpacking

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)

initialize DBs

initializeRequest()
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_getInputData = [(<class 'int'>, <class 'list'>)]
types_getJobAttribute = [<class 'int'>, <class 'str'>]
types_getJobAttributes = [<class 'int'>]
types_getJobHeartBeatData = [<class 'int'>]
types_getJobJDL = [<class 'int'>, <class 'bool'>]
types_getJobLoggingInfo = [<class 'int'>]
types_getJobParameter = [[<class 'str'>, <class 'int'>], <class 'str'>]
types_getJobParameters = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobSummary = [<class 'int'>]
types_getJobs = []
types_getJobsApplicationStatus = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobsMinorStatus = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobsSites = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobsStates = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobsStatus = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobsSummary = [<class 'list'>]
types_ping = []
types_refreshConfiguration = [<class 'bool'>]
types_whoami = []
class DIRAC.WorkloadManagementSystem.Service.JobMonitoringHandler.JobMonitoringHandlerMixin

Bases: object

classmethod export_getInputData(jobID)

Get input data for the specified jobs

classmethod export_getJobAttribute(jobID, attribute)
Parameters:
  • jobID (int) – one single Job ID

  • attribute (str) – one single attribute name

classmethod export_getJobAttributes(jobID, attrList=None)
Parameters:
  • jobID (int) – one single Job ID

  • attrList (list) – optional list of attributes

classmethod export_getJobHeartBeatData(jobID)
classmethod export_getJobJDL(jobID, original)
classmethod export_getJobLoggingInfo(jobID)
export_getJobParameter(jobID, parName)
Parameters:
  • jobID (str/int) – one single Job ID

  • parName (str) – one single parameter name

export_getJobParameters(jobIDs, parName=None)
Parameters:
  • jobIDs (str/int/list) – one single job ID or a list of them

  • parName (str) – one single parameter name, or None (meaning all of them)

classmethod export_getJobSummary(jobID)
classmethod export_getJobs(attrDict=None, cutDate=None)

Return list of JobIds matching the condition given in attrDict

classmethod export_getJobsApplicationStatus(jobIDs)
classmethod export_getJobsMinorStatus(jobIDs)
classmethod export_getJobsSites(jobIDs)
classmethod export_getJobsStates(jobIDs)
classmethod export_getJobsStatus(jobIDs)
classmethod export_getJobsSummary(jobIDs)
classmethod getJobsAttributes(*args, **kwargs)

Utility function for unpacking

classmethod initializeHandler(svcInfoDict)

initialize DBs

initializeRequest()
types_getInputData = [(<class 'int'>, <class 'list'>)]
types_getJobAttribute = [<class 'int'>, <class 'str'>]
types_getJobAttributes = [<class 'int'>]
types_getJobHeartBeatData = [<class 'int'>]
types_getJobJDL = [<class 'int'>, <class 'bool'>]
types_getJobLoggingInfo = [<class 'int'>]
types_getJobParameter = [[<class 'str'>, <class 'int'>], <class 'str'>]
types_getJobParameters = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobSummary = [<class 'int'>]
types_getJobs = []
types_getJobsApplicationStatus = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobsMinorStatus = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobsSites = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobsStates = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobsStatus = [[<class 'str'>, <class 'int'>, <class 'list'>]]
types_getJobsSummary = [<class 'list'>]