mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-21 03:27:21 -06:00
Correct delay time from 6 to 60 seconds
This commit is contained in:
parent
f8221340af
commit
ae342a0506
@ -23,7 +23,7 @@ class TokenAuthentication(authentication.TokenAuthentication):
|
|||||||
raise exceptions.AuthenticationFailed("Invalid token")
|
raise exceptions.AuthenticationFailed("Invalid token")
|
||||||
|
|
||||||
# Update last used, but only once a minute. This reduces the write load on the db
|
# Update last used, but only once a minute. This reduces the write load on the db
|
||||||
if not token.last_used or (timezone.now() - token.last_used).total_seconds() > 6:
|
if not token.last_used or (timezone.now() - token.last_used).total_seconds() > 60:
|
||||||
# If maintenance mode is enabled, assume the database is read-only, and disable updating the token's
|
# If maintenance mode is enabled, assume the database is read-only, and disable updating the token's
|
||||||
# last_used time upon authentication.
|
# last_used time upon authentication.
|
||||||
if get_config().MAINTENANCE_MODE:
|
if get_config().MAINTENANCE_MODE:
|
||||||
|
Loading…
Reference in New Issue
Block a user