15093 review changes

This commit is contained in:
Arthur Hanson 2024-10-17 14:28:37 -07:00
parent 5231464b27
commit 839b467f0d

View File

@ -789,6 +789,10 @@ STRAWBERRY_DJANGO = {
PLUGIN_CATALOG_URL = 'https://api.netbox.oss.netboxlabs.com/v1/plugins' PLUGIN_CATALOG_URL = 'https://api.netbox.oss.netboxlabs.com/v1/plugins'
EVENTS_PIPELINE = list(EVENTS_PIPELINE)
if 'extras.events.process_event_queue' not in EVENTS_PIPELINE:
EVENTS_PIPELINE.insert(0, 'extras.events.process_event_queue')
# Register any configured plugins # Register any configured plugins
for plugin_name in PLUGINS: for plugin_name in PLUGINS:
try: try:
@ -860,12 +864,11 @@ for plugin_name in PLUGINS:
}) })
events_pipeline = plugin_config.events_pipeline events_pipeline = plugin_config.events_pipeline
if events_pipeline and type(events_pipeline) in (list, tuple): if events_pipeline:
EVENTS_PIPELINE = list(EVENTS_PIPELINE) if type(events_pipeline) in (list, tuple):
if 'extras.events.process_event_queue' not in EVENTS_PIPELINE: EVENTS_PIPELINE.extend(events_pipeline)
EVENTS_PIPELINE.insert(0, 'extras.events.process_event_queue') else:
raise ImproperlyConfigured(f"events_pipline in plugin: {plugin_name} must be a list or tuple")
EVENTS_PIPELINE.extend(events_pipeline)
# UNSUPPORTED FUNCTIONALITY: Import any local overrides. # UNSUPPORTED FUNCTIONALITY: Import any local overrides.
try: try: