ExecutorMindHandler

The mind is a service the distributes “task” to executors

class DIRAC.Core.Base.ExecutorMindHandler.ExecutorMindHandler(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
MSG_DEFINITIONS = {'ExecutorError': {'eType': (<type 'str'>, <type 'unicode'>), 'errorMsg': (<type 'str'>, <type 'unicode'>), 'taskId': (<type 'int'>, <type 'long'>)}, 'ProcessTask': {'eType': (<type 'str'>, <type 'unicode'>), 'taskId': (<type 'int'>, <type 'long'>), 'taskStub': (<type 'str'>, <type 'unicode'>)}, 'TaskDone': {'taskId': (<type 'int'>, <type 'long'>), 'taskStub': (<type 'str'>, <type 'unicode'>)}, 'TaskError': {'eType': (<type 'str'>, <type 'unicode'>), 'errorMsg': (<type 'str'>, <type 'unicode'>), 'taskId': (<type 'int'>, <type 'long'>), 'taskStub': (<type 'str'>, <type 'unicode'>)}, 'TaskFreeze': {'freezeTime': (<type 'int'>, <type 'long'>), 'taskId': (<type 'int'>, <type 'long'>), 'taskStub': (<type 'str'>, <type 'unicode'>)}}
class MindCallbacks(sendTaskCB, dispatchCB, disconnectCB, taskProcCB, taskFreezeCB, taskErrCB)

Bases: DIRAC.Core.Utilities.ExecutorDispatcher.ExecutorDispatcherCallbacks

__init__(sendTaskCB, dispatchCB, disconnectCB, taskProcCB, taskFreezeCB, taskErrCB)
cbDisconectExecutor(eId)
cbDispatch(taskId, taskObj, pathExecuted)
cbSendTask(taskId, taskObj, eId, eType)
cbTaskError(taskId, taskObj, errorMsg)
cbTaskFreeze(taskId, taskObj, eType)
cbTaskProcessed(taskId, taskObj, eType)
__init__(handlerInitDict, trid)

Constructor

Parameters:
  • handlerInitDict (dictionary) – Information vars for the service
  • trid (object) – Transport to use
auth_conn_connected = ['all']
auth_conn_drop = ['all']
auth_conn_new = ['all']
auth_msg_ExecutorError = ['all']
auth_msg_TaskDone = ['all']
auth_msg_TaskError = ['all']
auth_msg_TaskFreeze = ['all']
auth_ping = ['all']
conn_connected(trid, identity, kwargs)
conn_drop(trid)
conn_new(trid, identity, kwargs)
classmethod exec_deserializeTask(taskStub)
classmethod exec_dispatch(taskId, taskObj, pathExecuted)
classmethod exec_executorConnected(execName, trid)
classmethod exec_executorDisconnected(trid)
classmethod exec_prepareToSend(taskId, taskObj, eId)
classmethod exec_serializeTask(taskObj)
classmethod exec_taskError(taskId, taskObj, errorMsg)
classmethod exec_taskFreeze(taskId, taskObj, eType)
classmethod exec_taskProcessed(taskId, taskObj, eType)
classmethod executeTask(taskId, taskObj)
static export_echo(data)

This method used for testing the performance of a service

export_ping()
classmethod forgetTask(taskId)
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 getExecutorsConnected()
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.
classmethod getTaskIds()
initialize()

Initialize this instance of the handler (to be overwritten)

classmethod initializeHandler(serviceInfoDict)
msg_ExecutorError(msgObj)
msg_TaskDone(msgObj)
msg_TaskError(msgObj)
msg_TaskFreeze(msgObj)
classmethod setAllowedClients(aClients)
classmethod setFailedOnTooFrozen(value)
classmethod setFreezeOnFailedDispatch(value)
classmethod setFreezeOnUnknownExecutor(value)
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 = []