From ae342a0506c627e3b23196ce49940b60b94f54f5 Mon Sep 17 00:00:00 2001 From: Pieter Lambrecht Date: Sun, 19 Jun 2022 12:41:44 +0200 Subject: [PATCH] Correct delay time from 6 to 60 seconds --- netbox/netbox/api/authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox/api/authentication.py b/netbox/netbox/api/authentication.py index e98376899..847bcbfd9 100644 --- a/netbox/netbox/api/authentication.py +++ b/netbox/netbox/api/authentication.py @@ -23,7 +23,7 @@ class TokenAuthentication(authentication.TokenAuthentication): raise exceptions.AuthenticationFailed("Invalid token") # 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 # last_used time upon authentication. if get_config().MAINTENANCE_MODE: