[PR #18747] [MERGED] Closes #18287: Enable periodic synchronization for data sources #15431

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18747
Author: @jeremystretch
Created: 2/26/2025
Status: Merged
Merged: 3/3/2025
Merged by: @jeremystretch

Base: featureHead: 18287-data-source-periodic-sync


📝 Commits (4)

  • 5e9172c Add sync_interval to DataSource
  • 91d8cb5 Enqueue a SyncDataSourceJob when needed after saving a DataSource
  • 50cdee4 Fix logic for clearing pending jobs on interval change
  • 5dde085 Fix lingering background tasks after modifying DataSource

📊 Changes

13 files changed (+98 additions, -17 deletions)

View changed files

📝 docs/models/core/datasource.md (+6 -0)
📝 netbox/core/api/serializers_/data.py (+2 -2)
📝 netbox/core/filtersets.py (+4 -0)
📝 netbox/core/forms/bulk_edit.py (+8 -2)
📝 netbox/core/forms/bulk_import.py (+2 -1)
📝 netbox/core/forms/filtersets.py (+6 -1)
📝 netbox/core/forms/model_forms.py (+5 -2)
netbox/core/migrations/0013_datasource_sync_interval.py (+18 -0)
📝 netbox/core/models/data.py (+6 -0)
📝 netbox/core/signals.py (+21 -3)
📝 netbox/core/tables/data.py (+6 -3)
📝 netbox/core/tests/test_filtersets.py (+10 -3)
📝 netbox/templates/core/datasource.html (+4 -0)

📄 Description

Closes: #18287

  • Add sync_interval field to DataSource
  • Automatically enqueue a SyncDataSourceJob when the configured interval for a DataSource changes

🔄 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/18747 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 2/26/2025 **Status:** ✅ Merged **Merged:** 3/3/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `18287-data-source-periodic-sync` --- ### 📝 Commits (4) - [`5e9172c`](https://github.com/netbox-community/netbox/commit/5e9172ce97a770cd27fe9f3142eff55225f15ab3) Add sync_interval to DataSource - [`91d8cb5`](https://github.com/netbox-community/netbox/commit/91d8cb596e27c80327635b653753562fc8cb23f9) Enqueue a SyncDataSourceJob when needed after saving a DataSource - [`50cdee4`](https://github.com/netbox-community/netbox/commit/50cdee4710ec3fb1c20552dc6536e23077017827) Fix logic for clearing pending jobs on interval change - [`5dde085`](https://github.com/netbox-community/netbox/commit/5dde085498c29eb27a0a7ba2eb35f80d60fdeb6d) Fix lingering background tasks after modifying DataSource ### 📊 Changes **13 files changed** (+98 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `docs/models/core/datasource.md` (+6 -0) 📝 `netbox/core/api/serializers_/data.py` (+2 -2) 📝 `netbox/core/filtersets.py` (+4 -0) 📝 `netbox/core/forms/bulk_edit.py` (+8 -2) 📝 `netbox/core/forms/bulk_import.py` (+2 -1) 📝 `netbox/core/forms/filtersets.py` (+6 -1) 📝 `netbox/core/forms/model_forms.py` (+5 -2) ➕ `netbox/core/migrations/0013_datasource_sync_interval.py` (+18 -0) 📝 `netbox/core/models/data.py` (+6 -0) 📝 `netbox/core/signals.py` (+21 -3) 📝 `netbox/core/tables/data.py` (+6 -3) 📝 `netbox/core/tests/test_filtersets.py` (+10 -3) 📝 `netbox/templates/core/datasource.html` (+4 -0) </details> ### 📄 Description ### Closes: #18287 - Add `sync_interval` field to DataSource - Automatically enqueue a SyncDataSourceJob when the configured interval for a DataSource changes --- <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:21:53 +01:00
adam closed this issue 2025-12-30 00:21:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15431