mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-02 05:46:25 -06:00
15093 add events_pipeline registration to plugins
This commit is contained in:
parent
1969f0dc71
commit
40b176a0cc
@ -78,6 +78,7 @@ class PluginConfig(AppConfig):
|
|||||||
menu_items = None
|
menu_items = None
|
||||||
template_extensions = None
|
template_extensions = None
|
||||||
user_preferences = None
|
user_preferences = None
|
||||||
|
events_pipeline = []
|
||||||
|
|
||||||
def _load_resource(self, name):
|
def _load_resource(self, name):
|
||||||
# Import from the configured path, if defined.
|
# Import from the configured path, if defined.
|
||||||
|
@ -859,6 +859,10 @@ for plugin_name in PLUGINS:
|
|||||||
f"{plugin_name}.{queue}": RQ_PARAMS for queue in plugin_config.queues
|
f"{plugin_name}.{queue}": RQ_PARAMS for queue in plugin_config.queues
|
||||||
})
|
})
|
||||||
|
|
||||||
|
events_pipeline = plugin_config.events_pipeline
|
||||||
|
if events_pipeline and type(events_pipeline) in (list, tuple):
|
||||||
|
EVENTS_PIPELINE.extend(events_pipeline)
|
||||||
|
|
||||||
# UNSUPPORTED FUNCTIONALITY: Import any local overrides.
|
# UNSUPPORTED FUNCTIONALITY: Import any local overrides.
|
||||||
try:
|
try:
|
||||||
from .local_settings import *
|
from .local_settings import *
|
||||||
|
Loading…
Reference in New Issue
Block a user