Skip to content

Commit

Permalink
Fix transition_waiting_queued validation
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter committed Feb 9, 2023
1 parent 33f191d commit b70bcc1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion distributed/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2663,7 +2663,14 @@ def transition_waiting_queued(self, key: str, stimulus_id: str) -> RecsMsgs:
ts = self.tasks[key]

if self.validate:
assert not self.idle_task_count, (ts, self.idle_task_count)
if self.is_rootish(ts):
assert not self.idle_task_count, (ts, self.idle_task_count)
else:
assert (
ts.worker_restrictions
or ts.host_restrictions
or ts.resource_restrictions
)
self._validate_ready(ts)

ts.state = "queued"
Expand Down

0 comments on commit b70bcc1

Please sign in to comment.