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

Cosmetic review of story() #6442

Merged
merged 5 commits into from
Jun 15, 2022
Merged
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
Prev Previous commit
Next Next commit
Merge branch 'main' into story_tags
crusaderky committed Jun 14, 2022
commit b050d28c7c460ee285ccad6ca40aac6da2fbcbc5
1,638 changes: 2 additions & 1,636 deletions distributed/worker.py

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions distributed/worker_state_machine.py
Original file line number Diff line number Diff line change
@@ -2774,10 +2774,14 @@ def _handle_refresh_who_has(self, ev: RefreshWhoHasEvent) -> RecsInstrs:
# Diagnostics #
###############

def story(self, *keys_or_tasks: str | TaskState) -> list[tuple]:
"""Return all transitions involving one or more tasks"""
keys = {e.key if isinstance(e, TaskState) else e for e in keys_or_tasks}
return worker_story(keys, self.log)
def story(self, *keys_or_tasks_or_stimuli: str | TaskState) -> list[tuple]:
"""Return all records from the transitions log involving one or more tasks or
stimulus_id's
"""
keys_or_stimuli = {
e.key if isinstance(e, TaskState) else e for e in keys_or_tasks_or_stimuli
}
return worker_story(keys_or_stimuli, self.log)

def stimulus_story(
self, *keys_or_tasks: str | TaskState
You are viewing a condensed version of this merge commit. You can view the full changes here.