Skip to content

Commit

Permalink
fix: sd trying to submit 0 pilot
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Jan 18, 2024
1 parent bfb0f67 commit e0734a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,14 @@ def _submitPilotsPerQueue(self, queueName: str):

# Get the number of available slots on the target site/queue
totalSlots = self._getQueueSlots(queueName)
# Apply the submission policy
totalSlots = self.submissionPolicy.apply(totalSlots, ceParameters=self.queueDict[queueName]["CE"].ceParameters)

if totalSlots <= 0:
self.log.verbose(f"{queueName}: No slot available")
return S_ERROR(f"{queueName}: No slot available")
self.log.info(f"{queueName}: to submit={totalSlots}")

# Apply the submission policy
totalSlots = self.submissionPolicy.apply(totalSlots, ceParameters=self.queueDict[queueName]["CE"].ceParameters)

# Limit the number of pilots to submit to self.maxPilotsToSubmit
pilotsToSubmit = min(self.maxPilotsToSubmit, totalSlots)

Expand Down

0 comments on commit e0734a9

Please sign in to comment.