[PR #19804] [MERGED] Closes #19589: Background job for bulk operations #15721

Closed
opened 2025-12-30 00:23:39 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19804
Author: @jeremystretch
Created: 7/2/2025
Status: Merged
Merged: 7/10/2025
Merged by: @jnovinger

Base: featureHead: 19589-bulk-import-jobs


📝 Commits (5)

  • da77b7c Initial work on #19589
  • bcb0c6c Add tooling for handling background requests
  • 99b23d0 UI notification should link to enqueued job
  • 3f7d24b Use an informative name for the job
  • fccccd0 Disable background jobs for file uploads

📊 Changes

8 files changed (+149 additions, -22 deletions)

View changed files

📝 netbox/core/models/jobs.py (+1 -1)
📝 netbox/netbox/jobs.py (+36 -0)
📝 netbox/netbox/middleware.py (+2 -10)
📝 netbox/netbox/views/generic/bulk_views.py (+38 -11)
📝 netbox/templates/generic/bulk_import.html (+2 -0)
📝 netbox/utilities/forms/bulk_import.py (+5 -0)
netbox/utilities/jobs.py (+46 -0)
📝 netbox/utilities/request.py (+19 -0)

📄 Description

Closes: #19589

  • Introduce AsyncViewJob to handle the background execution of arbitrary views
  • Introduce the apply_request_processors() utility context manager for applying request processors
  • Extend BulkImportView to support execution via a background job
  • Add the background_job checkbox to BulkImportForm
  • The string representation of a job now shows its name (rather than its task ID)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/19804 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 7/2/2025 **Status:** ✅ Merged **Merged:** 7/10/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `feature` ← **Head:** `19589-bulk-import-jobs` --- ### 📝 Commits (5) - [`da77b7c`](https://github.com/netbox-community/netbox/commit/da77b7c41a6f96785cc270f1487f1c1142544390) Initial work on #19589 - [`bcb0c6c`](https://github.com/netbox-community/netbox/commit/bcb0c6ccbcec39c887495ad92de4f3f536b86da8) Add tooling for handling background requests - [`99b23d0`](https://github.com/netbox-community/netbox/commit/99b23d0df13a3ef57ec4901cb80f295fa0949ca3) UI notification should link to enqueued job - [`3f7d24b`](https://github.com/netbox-community/netbox/commit/3f7d24b596806f19daa4ce8dd9efa427fd24dd01) Use an informative name for the job - [`fccccd0`](https://github.com/netbox-community/netbox/commit/fccccd0f0cd840155e6e404687adf6bd24a0b305) Disable background jobs for file uploads ### 📊 Changes **8 files changed** (+149 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/models/jobs.py` (+1 -1) 📝 `netbox/netbox/jobs.py` (+36 -0) 📝 `netbox/netbox/middleware.py` (+2 -10) 📝 `netbox/netbox/views/generic/bulk_views.py` (+38 -11) 📝 `netbox/templates/generic/bulk_import.html` (+2 -0) 📝 `netbox/utilities/forms/bulk_import.py` (+5 -0) ➕ `netbox/utilities/jobs.py` (+46 -0) 📝 `netbox/utilities/request.py` (+19 -0) </details> ### 📄 Description ### Closes: #19589 - Introduce AsyncViewJob to handle the background execution of arbitrary views - Introduce the `apply_request_processors()` utility context manager for applying request processors - Extend BulkImportView to support execution via a background job - Add the `background_job` checkbox to BulkImportForm - The string representation of a job now shows its name (rather than its task ID) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:23:39 +01:00
adam closed this issue 2025-12-30 00:23:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15721