Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,16 @@ def execute(self):

return S_OK()

def _getSortedQueues(self):
"""
Sorts the queues randomly. Can be overriden in derived classes for other ways of shuffling

:return: list of sorted queue dictionaries
"""
queueDictItems = list(self.queueDict.items())
random.shuffle(queueDictItems)
return queueDictItems

def submitPilots(self):
"""Go through defined computing elements and submit pilots if necessary and possible

Expand All @@ -365,8 +375,7 @@ def submitPilots(self):

self.totalSubmittedPilots = 0

queueDictItems = list(self.queueDict.items())
random.shuffle(queueDictItems)
queueDictItems = self._getSortedQueues()

for queueName, queueDictionary in queueDictItems:
# now submitting to the single queues
Expand Down
Loading