Apply all registered request processors when running custom scripts #10575

Closed
opened 2025-12-29 21:33:18 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Dec 12, 2024).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v4.1.8

Feature type

Change to existing functionality

Triage priority

I volunteer to perform this work (if approved)

Proposed functionality

When a custom script is run (as a background job), currently only the event_tracking request processor is employed:

e63fe23af8/netbox/extras/jobs.py (L101-L104)

All registered request processors should be applied here, not just event_tracking.

Use case

FR #18211 recently introduced the ability to dynamically register request processors (a planned feature for the plugins API). This change will ensure that any additional registered processors are run when executing custom scripts as well as when servicing requests.

Database changes

N/A

External dependencies

N/A

Originally created by @jeremystretch on GitHub (Dec 12, 2024). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v4.1.8 ### Feature type Change to existing functionality ### Triage priority I volunteer to perform this work (if approved) ### Proposed functionality When a custom script is run (as a background job), currently only the [`event_tracking`](https://github.com/netbox-community/netbox/blob/e63fe23af859d69c5960095ed812c99f782e5476/netbox/netbox/context_managers.py#L10) request processor is employed: https://github.com/netbox-community/netbox/blob/e63fe23af859d69c5960095ed812c99f782e5476/netbox/extras/jobs.py#L101-L104 All registered request processors should be applied here, not just `event_tracking`. ### Use case FR #18211 recently introduced the ability to dynamically register request processors (a planned feature for the plugins API). This change will ensure that any additional registered processors are run when executing custom scripts as well as when servicing requests. ### Database changes N/A ### External dependencies N/A
adam added the status: acceptedtype: featurecomplexity: low labels 2025-12-29 21:33:18 +01:00
adam closed this issue 2025-12-29 21:33:19 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10575