diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst index bf91f6b5f9..b83ba7d232 100644 --- a/docs/source/plugins.rst +++ b/docs/source/plugins.rst @@ -1,3 +1,12 @@ +Plugins +~~~~~~~ + +Dask's plugin system enables you to run custom Python code for certain events. You can use plugins +that are specific to schedulers, workers, or nannies. A worker plugin, for example, +allows you to run custom Python code on all your workers at certain event in the worker's lifecycle (e.g. when the worker process is started). +In each section below, you'll see how to create your own plugin or use a Dask-provided built-in +plugin. + Scheduler Plugins ================= @@ -81,6 +90,15 @@ Worker Plugins for creating your own worker plugins. In addition, Dask provides some :ref:`built-in plugins `. +Watch the video below for an example using a ``WorkerPlugin`` to add a +:py:class:`concurrent.futures.ProcessPoolExecutor`: + +.. raw:: html + + + .. autoclass:: distributed.diagnostics.plugin.WorkerPlugin :members: