[PR #9028] [MERGED] Fixes #5479 - Allow setting individual timeouts on scripts and reports #13423

Closed
opened 2025-12-29 22:27:19 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/9028
Author: @kkthxbye-code
Created: 4/4/2022
Status: Merged
Merged: 4/8/2022
Merged by: @jeremystretch

Base: developHead: job-timeout


📝 Commits (2)

  • 36d6ae3 Allow setting individual timeouts on scripts and reports
  • 69b4d0d #9028 - Fix pep8 syntax

📊 Changes

7 files changed (+23 additions, -7 deletions)

View changed files

📝 docs/customization/custom-scripts.md (+4 -0)
📝 netbox/extras/api/views.py (+4 -2)
📝 netbox/extras/management/commands/runreport.py (+2 -1)
📝 netbox/extras/models/models.py (+3 -1)
📝 netbox/extras/reports.py (+1 -0)
📝 netbox/extras/scripts.py (+4 -1)
📝 netbox/extras/views.py (+5 -2)

📄 Description

Fixes: #5479

Allows setting the job_timeout Meta attribute on scripts and the job_timeout attribute on reports. I tested UI, API and CLI execution. Scripts ran through the CLI do not support the timeout, as those are not ran through the rqworker for some reason.

I had to change enqueue_job slightly as I found no way to pass the timeout via. the delay method added by the @job decorator.


🔄 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/9028 **Author:** [@kkthxbye-code](https://github.com/kkthxbye-code) **Created:** 4/4/2022 **Status:** ✅ Merged **Merged:** 4/8/2022 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `job-timeout` --- ### 📝 Commits (2) - [`36d6ae3`](https://github.com/netbox-community/netbox/commit/36d6ae33d15e93cc552827cdea363a9c00c7f823) Allow setting individual timeouts on scripts and reports - [`69b4d0d`](https://github.com/netbox-community/netbox/commit/69b4d0d44b5f119dad14003e00dc78872cd836cb) #9028 - Fix pep8 syntax ### 📊 Changes **7 files changed** (+23 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `docs/customization/custom-scripts.md` (+4 -0) 📝 `netbox/extras/api/views.py` (+4 -2) 📝 `netbox/extras/management/commands/runreport.py` (+2 -1) 📝 `netbox/extras/models/models.py` (+3 -1) 📝 `netbox/extras/reports.py` (+1 -0) 📝 `netbox/extras/scripts.py` (+4 -1) 📝 `netbox/extras/views.py` (+5 -2) </details> ### 📄 Description ### Fixes: #5479 Allows setting the job_timeout Meta attribute on scripts and the job_timeout attribute on reports. I tested UI, API and CLI execution. Scripts ran through the CLI do not support the timeout, as those are not ran through the rqworker for some reason. I had to change enqueue_job slightly as I found no way to pass the timeout via. the `delay` method added by the `@job` decorator. --- <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-29 22:27:19 +01:00
adam closed this issue 2025-12-29 22:27:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13423