WMSUtilities

A set of utilities used in the WMS services

DIRAC.WorkloadManagementSystem.Service.WMSUtilities.getPilotCE(pilotDict)

Instantiate and return a CE bound to a pilot

DIRAC.WorkloadManagementSystem.Service.WMSUtilities.getPilotProxy(pilotDict)

Get a proxy bound to a pilot

Parameters:

pilotDict (dict) – pilot parameters

Returns:

S_OK/S_ERROR with proxy as Value

DIRAC.WorkloadManagementSystem.Service.WMSUtilities.getPilotRef(pilotReference, pilotDict)

Add the pilotStamp to the pilotReference, if the pilotStamp is in the dictionary, otherwise return unchanged pilotReference.

DIRAC.WorkloadManagementSystem.Service.WMSUtilities.killPilotsInQueues(pilotRefDict, ceCache=None)

Kill pilots queue by queue.

Pilots are grouped per queue in pilotRefDict (key "<vo>@@@<site>@@@<ce>@@@<queue>") and killed with a single call per queue. Every queue is attempted: failures are collected and reported together, so a single unreachable CE no longer prevents pilots on the other queues from being killed (previous versions failed fast on the first error).

Parameters:
  • pilotRefDict (dict) – {queueKey: {"GridType": str, "PilotList": [ref, ...]}}

  • ceCache – optional QueueCECache whose CEs (and their connections) are reused across calls. When omitted, a transient cache is created for this call only.

Returns:

S_OK() if all queues succeeded, otherwise S_ERROR aggregating the failures

DIRAC.WorkloadManagementSystem.Service.WMSUtilities.setPilotCredentials(ce, pilotDict)

Instrument the given CE with proxy or token

Parameters:
  • ce (obj) – CE object

  • pilotDict – pilot parameter dictionary

Returns:

S_OK/S_ERROR