From 6289452e9580a95fa2a4b87eec28ca8d7142e4d8 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Wed, 29 Jul 2020 06:41:28 +0200 Subject: [PATCH] Document inability to control plugin execution order --- docs/plugins.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/plugins.rst b/docs/plugins.rst index a4ef91d6..3a56ed07 100644 --- a/docs/plugins.rst +++ b/docs/plugins.rst @@ -70,8 +70,8 @@ How to create plugins ===================== Plugins are based on the concept of signals. Pelican sends signals, and plugins -subscribe to those signals. The list of signals are defined in a subsequent -section. +subscribe to those signals. The list of available signals is documented in a +subsequent section. The only rule to follow for plugins is to define a ``register`` callable, in which you map the signals to your plugin logic. Let's take a simple example:: @@ -94,6 +94,10 @@ which you map the signals to your plugin logic. Let's take a simple example:: your ``register`` callable or they will be garbage-collected before the signal is emitted. +If multiple plugins connect to the same signal, there is no way to guarantee or +control in which order the plugins will be executed. This is a limitation +inherited from Blinker_, the dependency Pelican uses to implement signals. + Namespace plugin structure -------------------------- @@ -272,3 +276,4 @@ Adding a new generator is also really easy. You might want to have a look at .. _Pip: https://pip.pypa.io/ .. _pelican-plugins bug #314: https://github.com/getpelican/pelican-plugins/issues/314 +.. _Blinker: https://pythonhosted.org/blinker/