ExecutorDispatcher

Used by the executors for dispatching events (IIUC)

class DIRAC.Core.Utilities.ExecutorDispatcher.ExecutorDispatcher(monitor=None)

Bases: object

class ETask(taskId, taskObj)

Bases: object

__init__(taskId, taskObj)
__init__(monitor=None)
Parameters

monitor – good question…. what’s meant to be used for monitoring. Either a :py:class`DIRAC.FrameworkSystem.Client.MonitoringClient.MonitoringClient` or a :py:class`DIRAC.MonitoringSystem.Client.MonitoringReporter.MonitoringReporter`

addExecutor(eId, eTypes, maxTasks=1)
addTask(taskId, taskObj)
freezeTask(eId, taskId, freezeTime, taskObj=False)
getExecutorsConnected()
getTask(taskId)
getTaskIds()
removeExecutor(eId)
removeTask(taskId)
retryTask(eId, taskId)
setCallbacks(callbacksObj)
setFailedOnTooFrozen(value)
setFreezeOnFailedDispatch(value)
setFreezeOnUnknownExecutor(value)
taskProcessed(eId, taskId, taskObj=False)
class DIRAC.Core.Utilities.ExecutorDispatcher.ExecutorDispatcherCallbacks

Bases: object

cbDisconectExecutor(eId)
cbDispatch(taskId, taskObj, pathExecuted)
cbSendTask(taskId, taskObj, eId, eType)
cbTaskError(taskId, taskObj, errorMsg)
cbTaskFreeze(taskId, taskObj, eType)
cbTaskProcessed(taskId, taskObj, eType)
class DIRAC.Core.Utilities.ExecutorDispatcher.ExecutorQueues(log=False)

Bases: object

__init__(log=False)
deleteTask(taskId)
getExecutorList()
getState()
popTask(eTypes)
pushTask(eType, taskId, ahead=False)
waitingTasks(eType)
class DIRAC.Core.Utilities.ExecutorDispatcher.ExecutorState(log=False)

Bases: object

__init__(log=False)
addExecutor(eId, eTypes, maxTasks=1)
addTask(eId, taskId)
freeSlots(eId)
full(eId)
getExecutorOfTask(taskId)
getFreeExecutors(eType)
getIdleExecutor(eType)
getTasksForExecutor(eId)
removeExecutor(eId)
removeTask(taskId, eId=None)
exception DIRAC.Core.Utilities.ExecutorDispatcher.UnrecoverableTaskException

Bases: Exception

__init__(*args, **kwargs)
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.