-
-
Notifications
You must be signed in to change notification settings - Fork 750
Description
Today scheduler plugins are added to a cluster by calling the Scheduler.add_plugin method. I often see plugins added at scheduler startup through a preload script.
However, it's also useful to be able to add a scheduler plugin to an existing, already running scheduler. In these cases one often doesn't have direct access to the Scheduler instance and ends up calling client.run_on_scheduler to add their plugin:
def register_plugin(plugin):
await plugin.start()
dask_scheduler.add_plugin(plugin)
client.run_on_scheduler(register_plugin)This works, but is a little awkward. Additionally, some users might not be aware that client.run_on_scheduler exists.
It would be nice if we had a client.register_scheduler_plugin, which was similar to our existing client.register_worker_plugin, to allow users to register their own scheduler plugins in a more straightforward way.
cc @douglasdavis who may be interested in adding a client.register_scheduler_plugin method