-
-
Notifications
You must be signed in to change notification settings - Fork 748
Refactor scheduler plugins; store in a dictionary #5120
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
Conversation
e4ab7bd to
719dbb9
Compare
|
OK this is ready for a first review-- the main thing that I'm not sure about is the introduction of names for the builtin plugins. I've implemented name discovery similar to worker plugins: that is, if a name attribute is present on the plugin instance, it is taken as the name to be used as the key in the plugin dictionary. Are there any scheduler plugin classes that are designed/capable of having multiple instances used? An alternative would be to use the |
| """Maintain a copy of worker events""" | ||
|
|
||
| def __init__(self, scheduler=None): | ||
| self.name = "EventStream" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
w.r.t. #5120 (comment): Here's an example of giving a name to a builtin plugin
|
After seeing #5127, perhaps something similar should be done for SchedulerPlugins (a name property which uses |
jrbourbeau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @douglasdavis!
|
Thanks for the feedback @jrbourbeau! I think I covered everything so far, happy to make further adjustments |
|
Thanks for the updates @douglasdavis! FWIW there's a discussion over in #5127 around how worker and nanny plugins treat repeats different which you may find interesting |
|
I need something similar to this for some ongoing work. My apologies for taking over. I hope that you don't mind. |
|
This is in. Thank you @douglasdavis |
|
Don't mind at all, thanks for getting it over the finish line |
Closes #xxxxblack distributed/flake8 distributed/isort distributedFollowing up on some discussion in #4808, this converts scheduler plugin storage from a list to a dictionary (key: name, value: plugin instance)