Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion distributed/dashboard/components/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3343,7 +3343,7 @@ def update(self):

for tp in self.scheduler.task_prefixes.values():
states = tp.states
if any(states.get(s) for s in state.keys()):
if any(v for k, v in states.items() if k != "forgotten"):
state["memory"][tp.name] = states["memory"]
state["erred"][tp.name] = states["erred"]
state["released"][tp.name] = states["released"]
Expand Down
24 changes: 24 additions & 0 deletions distributed/dashboard/tests/test_scheduler_bokeh.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,30 @@ async def test_TaskProgress_empty(c, s, a, b):
assert not any(len(v) for v in tp.source.data.values())


@gen_cluster(client=True)
async def test_TaskProgress_no_worker(c, s, a, b):
"""The no-worker state has special treatment as dashes cause issues in Bokeh"""
tp = TaskProgress(s)

future = c.submit(slowinc, 0, resources={"foo": 1})
while not s.tasks:
await asyncio.sleep(0.01)

tp.update()
assert tp.source.data["all"] == [1]
assert tp.source.data["no_worker"] == [1]
assert tp.source.data["name"] == ["slowinc"]

del future
while s.tasks:
await asyncio.sleep(0.01)

tp.update()
assert tp.source.data["all"] == []
assert tp.source.data["no_worker"] == []
assert tp.source.data["name"] == []


@gen_cluster(client=True)
async def test_CurrentLoad(c, s, a, b):
cl = CurrentLoad(s)
Expand Down
Loading