PilotStatusAgent

The Pilot Status Agent updates the status of the pilot jobs in the PilotAgents database.

class DIRAC.WorkloadManagementSystem.Agent.PilotStatusAgent.PilotStatusAgent(*args, **kwargs)

Bases: DIRAC.Core.Base.AgentModule.AgentModule

The specific agents must provide the following methods:
  • initialize() for initial settings

  • beginExecution()

  • execute() - the main method called in the agent cycle

  • endExecution()

  • finalize() - the graceful exit of the method, this one is usually used

    for the agent restart

__init__(*args, **kwargs)

c’tor

accountPilots(pilotsToAccount, connection)

account for pilots

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()
endExecution()
execute()

The PilotAgent execution method.

finalize()
handleOldPilots(connection)

select all pilots that have not been updated in the last N days and declared them Deleted, accounting for them.

initialize()

Sets defaults