diff --git a/docs/configuration/miscellaneous.md b/docs/configuration/miscellaneous.md index ef5636231..7099271be 100644 --- a/docs/configuration/miscellaneous.md +++ b/docs/configuration/miscellaneous.md @@ -111,7 +111,7 @@ By default, NetBox will prevent the creation of duplicate prefixes and IP addres Default: ['extras.events.process_event_queue',] -NetBox will call functions listed here for events (create, update, delete) on models as well as when custom EventRules are fired. +NetBox will call dotted paths to the functions listed here for events (create, update, delete) on models as well as when custom EventRules are fired. --- diff --git a/docs/plugins/development/index.md b/docs/plugins/development/index.md index f7c7af4b2..a5384a2b5 100644 --- a/docs/plugins/development/index.md +++ b/docs/plugins/development/index.md @@ -114,7 +114,7 @@ NetBox looks for the `config` variable within a plugin's `__init__.py` to load i | `max_version` | Maximum version of NetBox with which the plugin is compatible | | `middleware` | A list of middleware classes to append after NetBox's build-in middleware | | `queues` | A list of custom background task queues to create | -| `events_pipeline` | An optional list of functions to add to the [`EVENTS_PIPELINE`](./miscellaneous.md#events_pipeline) | +| `events_pipeline` | An optional list of dotted paths to add to the [`EVENTS_PIPELINE`](./miscellaneous.md#events_pipeline) | | `search_extensions` | The dotted path to the list of search index classes (default: `search.indexes`) | | `data_backends` | The dotted path to the list of data source backend classes (default: `data_backends.backends`) | | `template_extensions` | The dotted path to the list of template extension classes (default: `template_content.template_extensions`) | diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 6af0edbb7..779f399ef 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -862,8 +862,13 @@ for plugin_name in PLUGINS: events_pipeline = plugin_config.events_pipeline if events_pipeline and type(events_pipeline) in (list, tuple): EVENTS_PIPELINE = list(EVENTS_PIPELINE) + if 'extras.events.process_event_queue' not in EVENTS_PIPELINE: + EVENTS_PIPELINE.insert(0, 'extras.events.process_event_queue') + EVENTS_PIPELINE.extend(events_pipeline) +print(EVENTS_PIPELINE) + # UNSUPPORTED FUNCTIONALITY: Import any local overrides. try: from .local_settings import *