Skip to content

Commit

Permalink
fix can_run signature
Browse files Browse the repository at this point in the history
  • Loading branch information
francesconazzaro committed Nov 20, 2024
1 parent 5d20448 commit b566799
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cads_broker/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def submit_requests(
requests_counter = 0
for request in queue:
if self.qos.can_run(
request, session=session_write, scheduler=self.internal_scheduler
request, scheduler=self.internal_scheduler
):
if requests_counter <= int(number_of_requests):
self.submit_request(request, session=session_write)
Expand Down
2 changes: 1 addition & 1 deletion cads_broker/qos/QoS.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def user_limit(self, request):
@locked
def pick(self, queue, session):
# Create the list of requests than can run
candidates = [(n, r) for n, r in enumerate(queue) if self.can_run(r, session)]
candidates = [(n, r) for n, r in enumerate(queue) if self.can_run(r)]

# If no request can run, return 'None'
if len(candidates) == 0:
Expand Down

0 comments on commit b566799

Please sign in to comment.