Skip to content

Commit

Permalink
Fix dashboard (dask#8293)
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmakait authored Oct 24, 2023
1 parent 0ae8110 commit d0af984
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions distributed/dashboard/components/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4457,11 +4457,10 @@ def update(self):
data["y"].append(i)
data["worker"].append(worker)
for prefix in ["comm", "disk"]:
memory_limit = d[prefix]["memory_limit"] or 0
data[f"{prefix}_total"].append(d[prefix]["total"])
data[f"{prefix}_memory"].append(d[prefix]["memory"])
data[f"{prefix}_memory_limit"].append(
d[prefix]["memory_limit"] or 0
)
data[f"{prefix}_memory_limit"].append(memory_limit)
data[f"{prefix}_buckets"].append(d[prefix]["buckets"])
data[f"{prefix}_avg_duration"].append(
d[prefix]["diagnostics"].get("avg_duration", 0)
Expand All @@ -4473,7 +4472,7 @@ def update(self):
data[f"{prefix}_written"].append(d[prefix]["written"])
if self.scheduler.workers[worker].last_seen < now - 5:
data[f"{prefix}_color"].append("gray")
elif d[prefix]["memory"] > d[prefix]["memory_limit"]:
elif d[prefix]["memory"] > memory_limit:
data[f"{prefix}_color"].append("red")
else:
data[f"{prefix}_color"].append("blue")
Expand Down

0 comments on commit d0af984

Please sign in to comment.