Explorar o código

Correct delay time from 6 to 60 seconds

Pieter Lambrecht %!s(int64=4) %!d(string=hai) anos
pai
achega
ae342a0506
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      netbox/netbox/api/authentication.py

+ 1 - 1
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: