distributed 2021.10.0

A worker plugin enables custom code to run at different stages of the Workers' lifecycle. A nanny plugin does the same thing, but benefits from being able to run code before the worker is started, or to restart the worker if necessary.

To implement a plugin implement some of the methods of this class and register the plugin to your client in order to have it attached to every existing and future nanny by passing nanny=True to Client.register_worker_plugin<distributed.Client.register_worker_plugin> .

The restart attribute is used to control whether or not a running Worker needs to be restarted when registering the plugin.

Interface to extend the Nanny

See Also

SchedulerPlugin
WorkerPlugin

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /distributed/diagnostics/plugin.py#165
type: <class 'type'>
Commit: