Skip to content

Commit

Permalink
Dump has_what, missing_dep_flight (#6830)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjoseph92 authored Aug 5, 2022
1 parent 0dd00be commit 3f91ad3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions distributed/tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3327,9 +3327,11 @@ async def test_Worker__to_dict(c, s, a):
"nthreads",
"running",
"ready",
"has_what",
"constrained",
"executing",
"long_running",
"missing_dep_flight",
"in_flight_tasks",
"in_flight_workers",
"busy_workers",
Expand Down
2 changes: 2 additions & 0 deletions distributed/tests/test_worker_state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def test_WorkerState__to_dict(ws):
"data": {"y": None},
"data_needed": {},
"executing": [],
"has_what": {"127.0.0.1:1235": ["x"]},
"in_flight_tasks": ["x"],
"in_flight_workers": {"127.0.0.1:1235": ["x"]},
"log": [
Expand All @@ -166,6 +167,7 @@ def test_WorkerState__to_dict(ws):
["y", "receive-from-scatter", "s2"],
],
"long_running": [],
"missing_dep_flight": [],
"nthreads": 1,
"ready": [],
"running": True,
Expand Down
2 changes: 2 additions & 0 deletions distributed/worker_state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3070,9 +3070,11 @@ def _to_dict(self, *, exclude: Container[str] = ()) -> dict:
for w, tss in self.data_needed.items()
},
"executing": {ts.key for ts in self.executing},
"has_what": dict(self.has_what),
"long_running": {ts.key for ts in self.long_running},
"in_flight_tasks": {ts.key for ts in self.in_flight_tasks},
"in_flight_workers": self.in_flight_workers,
"missing_dep_flight": [ts.key for ts in self.missing_dep_flight],
"busy_workers": self.busy_workers,
"log": self.log,
"stimulus_log": self.stimulus_log,
Expand Down

0 comments on commit 3f91ad3

Please sign in to comment.