mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-23 16:06:43 -06:00
14132 optimize flush_events
This commit is contained in:
parent
a2f542774d
commit
12b4bf80bc
@ -137,9 +137,10 @@ def flush_events(queue):
|
|||||||
"""
|
"""
|
||||||
Flush a list of object representation to RQ for webhook processing.
|
Flush a list of object representation to RQ for webhook processing.
|
||||||
"""
|
"""
|
||||||
for name in settings.NETBOX_EVENTS_PIPELINE:
|
if queue:
|
||||||
try:
|
for name in settings.NETBOX_EVENTS_PIPELINE:
|
||||||
func = module_member(name)
|
try:
|
||||||
func(queue)
|
func = module_member(name)
|
||||||
except Exception as e:
|
func(queue)
|
||||||
logger.error(f"Cannot import events pipeline {name} error: {e}")
|
except Exception as e:
|
||||||
|
logger.error(f"Cannot import events pipeline {name} error: {e}")
|
||||||
|
Loading…
Reference in New Issue
Block a user