Commit f7594c2e authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

dask: fixed sched.idle usage

parent 419cedce
......@@ -239,10 +239,10 @@ class AffineRescheduling(Reschedule):
p = len(ws.processing)
if p <= nc or occ < self.idle_tresh:
sched.idle.add(ws)
sched.idle[ws._address] = ws
sched.saturated.discard(ws)
else:
sched.idle.discard(ws)
sched.idle.pop(ws._address, None)
avg = sched.total_occupancy / ntot
pending = occ * (p - nc) / p / nc
......@@ -315,7 +315,7 @@ class AffineRescheduling(Reschedule):
# get needs
host2need = defaultdict(self._Need)
for ws in sched.idle:
for ws in sched.idle.values():
if not ws.memory_limit:
continue
nproc = len(ws.processing)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment