Skip to content

Commit

Permalink
cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Jun 1, 2022
1 parent 4d60424 commit c0b2bd4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions distributed/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3973,7 +3973,6 @@ def _(self, ev: RefreshWhoHasEvent) -> RecsInstrs:
self._update_who_has(ev.who_has)
recommendations: Recs = {}
instructions: Instructions = []
ensure_communicating = False

for key in ev.who_has:
ts = self.tasks.get(key)
Expand All @@ -3987,16 +3986,13 @@ def _(self, ev: RefreshWhoHasEvent) -> RecsInstrs:
# workers are in flight or busy. We're deliberately not testing the
# minute use cases here for the sake of simplicity; instead we rely on
# _ensure_communicating to be a no-op when there's nothing to do.
ensure_communicating = True
recommendations, instructions = merge_recs_instructions(
(recommendations, instructions),
self._ensure_communicating(stimulus_id=ev.stimulus_id),
)
elif not ts.who_has and ts.state == "fetch":
recommendations[ts] = "missing"

if ensure_communicating:
recommendations, instructions = merge_recs_instructions(
(recommendations, instructions),
self._ensure_communicating(stimulus_id=ev.stimulus_id),
)

return recommendations, instructions

def _prepare_args_for_execution(
Expand Down

0 comments on commit c0b2bd4

Please sign in to comment.