Skip to content

Commit

Permalink
Change title for plugins documentation (#6733)
Browse files Browse the repository at this point in the history
  • Loading branch information
scharlottej13 authored Jul 26, 2022
1 parent fd22e5a commit a53858a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/source/plugins.rst
Original file line number Diff line number Diff line change
@@ -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
=================

Expand Down Expand Up @@ -81,6 +90,15 @@ Worker Plugins
for creating your own worker plugins. In addition, Dask provides some
:ref:`built-in plugins <plugins.builtin>`.

Watch the video below for an example using a ``WorkerPlugin`` to add a
:py:class:`concurrent.futures.ProcessPoolExecutor`:

.. raw:: html

<iframe width="560"
height="315" src="https://www.youtube.com/embed/vF2VItVU5zg?start=468"
style="margin: 0 auto 20px auto; display: block;" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

.. autoclass:: distributed.diagnostics.plugin.WorkerPlugin
:members:

Expand Down

0 comments on commit a53858a

Please sign in to comment.