RequestExecutingAgent

mod:RequestExecutingAgent

synopsis:request executing agent

request processing agent

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

Bases: exceptions.Exception

misconfiguration error

__init__(msg)

ctor :param str msg: error string

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

__init__(*args, **kwargs)

c’tor

am_Enabled()
am_checkStopAgentFile()
am_createStopAgentFile()
am_disableMonitoring()
am_getBasePath()
am_getControlDirectory()
am_getCyclesDone()
am_getMaxCycles()
am_getModuleParam(optionName)
am_getOption(optionName, defaultValue=None)

Gets an option from the agent’s configuration section. The section will be a subsection of the /Systems section in the CS.

am_getPollingTime()
am_getShifterProxyLocation()
am_getStopAgentFile()
am_getWatchdogTime()
am_getWorkDirectory()
am_go()
am_initialize(*initArgs)

Common initialization for all the agents.

This is executed every time an agent (re)starts. This is called by the AgentReactor, should not be overridden.

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)