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

Support receiving stimulus_id's in Scheduler.reschedule #6307

Closed
Closed
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions distributed/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6697,7 +6697,7 @@ async def get_story(self, keys=()):

transition_story = story

def reschedule(self, key=None, worker=None):
def reschedule(self, key=None, worker=None, stimulus_id=None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not counting tests, I can see that this method is invoked only

  • from the worker, through RPC
  • directly, from stealing.py

In both cases a stimulus_id is available. So you could change this to mandatory.

"""Reschedule a task

Things may have shifted and this task may now be better suited to run
Expand All @@ -6715,7 +6715,7 @@ def reschedule(self, key=None, worker=None):
return
if worker and ts.processing_on.address != worker:
return
self.transitions({key: "released"}, f"reschedule-{time()}")
self.transitions({key: "released"}, stimulus_id or f"reschedule-{time()}")

#####################
# Utility functions #
Expand Down