Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demote ensure_computing to function #5153

Merged
merged 1 commit into from
Aug 2, 2021
Merged
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
10 changes: 5 additions & 5 deletions distributed/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,7 @@ def transition_executing_long_running(self, ts, compute_duration=None):
}
)

self.io_loop.add_callback(self.ensure_computing)
self.ensure_computing()
except Exception as e:
logger.exception(e)
if LOG_PDB:
Expand Down Expand Up @@ -2464,7 +2464,7 @@ async def gather_dep(
if self.validate:
self.validate_state()

await self.ensure_computing()
self.ensure_computing()

if not busy:
self.repetitively_busy = 0
Expand Down Expand Up @@ -2822,7 +2822,7 @@ async def _maybe_deserialize_task(self, ts):
self.log.append((ts.key, "deserialize-error"))
raise

async def ensure_computing(self):
def ensure_computing(self):
if self.paused:
return
try:
Expand Down Expand Up @@ -2979,7 +2979,7 @@ async def execute(self, key):
ts.traceback = emsg["traceback"]
self.transition(ts, "error")
finally:
await self.ensure_computing()
self.ensure_computing()
self.ensure_communicating()

def _prepare_args_for_execution(self, ts, args, kwargs):
Expand Down Expand Up @@ -3050,7 +3050,7 @@ async def check_pause(memory):
else "None",
)
self.paused = False
await self.ensure_computing()
self.ensure_computing()

await check_pause(memory)
# Dump data to disk if above 70%
Expand Down