RequestExecutingAgent

mod:RequestExecutingAgent

synopsis:request executing agent

request processing agent

exception DIRAC.RequestManagementSystem.Agent.RequestExecutingAgent.AgentConfigError(msg)

Bases: exceptions.Exception

misconfiguration error

args
message
class DIRAC.RequestManagementSystem.Agent.RequestExecutingAgent.RequestExecutingAgent(*args, **kwargs)

Bases: DIRAC.Core.Base.AgentModule.AgentModule

class RequestExecutingAgent

request processing agent using ProcessPool, Operation handlers and RequestTask

am_Enabled()
am_checkStopAgentFile()
am_createStopAgentFile()
am_disableMonitoring()
am_getBasePath()
am_getControlDirectory()
am_getCyclesDone()
am_getMaxCycles()
am_getModuleParam(optionName)
am_getOption(optionName, defaultValue=None)
am_getPollingTime()
am_getShifterProxyLocation()
am_getStopAgentFile()
am_getWatchdogTime()
am_getWorkDirectory()
am_go()
am_initialize(*initArgs)
am_monitoringEnabled()
am_removeStopAgentFile()
am_secureCall(functor, args=(), name=False)
am_setModuleParam(optionName, value)
am_setOption(optionName, value)
am_stopExecution()
beginExecution()
cacheRequest(request)

put request into requestCache

Parameters:request (Request) – Request instance
endExecution()
exceptionCallback(taskID, taskException)

definition of exception callback function

Parameters:
  • taskID (str) – Request.RequestID
  • taskException (Exception) – Exception instance
execute()

read requests from RequestClient and enqueue them into ProcessPool

finalize()

agent finalization

getTimeout(request)

get timeout for request

initialize()

initialize agent

processPool()

facade for ProcessPool

putAllRequests()

put back all requests without callback called into requestClient

Parameters:self – self reference
putRequest(requestID, taskResult=None)

put back :requestID: to RequestClient

Parameters:requestID (str) – request’s id
requestClient()

RequestClient getter

resultCallback(taskID, taskResult)

definition of request callback function

Parameters:
  • taskID (str) – Request.RequestID
  • taskResult (dict) – task result S_OK(Request)/S_ERROR(Message)