Skip to content

Commit 7c6e5a6

Browse files
committed
Remove the RELEASE_CHECK_TIMEOUT parameter
1 parent fa99263 commit 7c6e5a6

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

docs/configuration/optional-settings.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -478,19 +478,11 @@ When remote user authentication is in use, this is the name of the HTTP header w
478478

479479
---
480480

481-
## RELEASE_CHECK_TIMEOUT
482-
483-
Default: 86,400 (24 hours)
484-
485-
The number of seconds to retain the latest version that is fetched from the GitHub API before automatically invalidating it and fetching it from the API again. This must be set to at least one hour (3600 seconds).
486-
487-
---
488-
489481
## RELEASE_CHECK_URL
490482

491483
Default: None (disabled)
492484

493-
This parameter defines the URL of the repository that will be checked periodically for new NetBox releases. When a new release is detected, a message will be displayed to administrative users on the home page. This can be set to the official repository (`'https://api.github.com/repos/netbox-community/netbox/releases'`) or a custom fork. Set this to `None` to disable automatic update checks.
485+
This parameter defines the URL of the repository that will be checked for new NetBox releases. When a new release is detected, a message will be displayed to administrative users on the home page. This can be set to the official repository (`'https://api.github.com/repos/netbox-community/netbox/releases'`) or a custom fork. Set this to `None` to disable automatic update checks.
494486

495487
!!! note
496488
The URL provided **must** be compatible with the [GitHub REST API](https://docs.github.com/en/rest).

netbox/netbox/configuration.example.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,6 @@
241241
REMOTE_AUTH_DEFAULT_GROUPS = []
242242
REMOTE_AUTH_DEFAULT_PERMISSIONS = {}
243243

244-
# This determines how often the GitHub API is called to check the latest release of NetBox. Must be at least 1 hour.
245-
RELEASE_CHECK_TIMEOUT = 24 * 3600
246-
247244
# This repository is used to check whether there is a new release of NetBox available. Set to None to disable the
248245
# version check or use the URL below to check for release in the official NetBox repository.
249246
RELEASE_CHECK_URL = None

netbox/netbox/settings.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@
4747

4848
# Warn on removed config parameters
4949
if hasattr(configuration, 'CACHE_TIMEOUT'):
50-
warnings.warn("The CACHE_TIMEOUT configuration parameter was removed in v3.0.0 and no longer has any effect.")
50+
warnings.warn(
51+
"The CACHE_TIMEOUT configuration parameter was removed in v3.0.0 and no longer has any effect."
52+
)
53+
if hasattr(configuration, 'RELEASE_CHECK_TIMEOUT'):
54+
warnings.warn(
55+
"The RELEASE_CHECK_TIMEOUT configuration parameter was removed in v3.0.0 and no longer has any effect."
56+
)
5157

5258
# Enforce required configuration parameters
5359
for parameter in ['ALLOWED_HOSTS', 'DATABASE', 'SECRET_KEY', 'REDIS']:
@@ -114,7 +120,6 @@
114120
REMOTE_AUTH_ENABLED = getattr(configuration, 'REMOTE_AUTH_ENABLED', False)
115121
REMOTE_AUTH_HEADER = getattr(configuration, 'REMOTE_AUTH_HEADER', 'HTTP_REMOTE_USER')
116122
RELEASE_CHECK_URL = getattr(configuration, 'RELEASE_CHECK_URL', None)
117-
RELEASE_CHECK_TIMEOUT = getattr(configuration, 'RELEASE_CHECK_TIMEOUT', 24 * 3600)
118123
REPORTS_ROOT = getattr(configuration, 'REPORTS_ROOT', os.path.join(BASE_DIR, 'reports')).rstrip('/')
119124
RQ_DEFAULT_TIMEOUT = getattr(configuration, 'RQ_DEFAULT_TIMEOUT', 300)
120125
SCRIPTS_ROOT = getattr(configuration, 'SCRIPTS_ROOT', os.path.join(BASE_DIR, 'scripts')).rstrip('/')
@@ -141,10 +146,6 @@
141146
except ValidationError as err:
142147
raise ImproperlyConfigured(str(err))
143148

144-
# Enforce a minimum cache timeout for update checks
145-
if RELEASE_CHECK_TIMEOUT < 3600:
146-
raise ImproperlyConfigured("RELEASE_CHECK_TIMEOUT has to be at least 3600 seconds (1 hour)")
147-
148149

149150
#
150151
# Database

0 commit comments

Comments
 (0)