Skip to content

Commit

Permalink
fix: check the VO from the task queues before submitting pilots
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Feb 29, 2024
1 parent ae56101 commit 5c3f364
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,12 @@ def _getNumberOfJobsNeedingPilots(self, waitingPilots: int, queue: str):
return 0
taskQueueDict = result["Value"]

# Get the number of jobs that would match the capability of the CE
# Get the number of jobs that would match the capability of the CE and the VO
waitingSupportedJobs = 0
for tq in taskQueueDict.values():
waitingSupportedJobs += tq["Jobs"]
ownerGroup = tq.get("OwnerGroup", "")
if Registry.getVOForGroup(ownerGroup) == self.vo:
waitingSupportedJobs += tq["Jobs"]

# Get the number of jobs that need pilots
return max(0, waitingSupportedJobs - waitingPilots)
Expand Down

0 comments on commit 5c3f364

Please sign in to comment.