Set tokens to expire 5 minutes early

Prevents occasional usage of tokens the very second they expire
This commit is contained in:
Zed
2022-01-16 17:56:45 +01:00
parent 3ab778b49c
commit 3d91ae0256
2 changed files with 1 additions and 16 deletions

View File

@@ -6,8 +6,8 @@ import types, agents, consts, http_pool
const
maxConcurrentReqs = 5 # max requests at a time per token, to avoid race conditions
maxAge = 3.hours # tokens expire after 3 hours
maxLastUse = 1.hours # if a token is unused for 60 minutes, it expires
maxAge = 2.hours + 55.minutes # tokens expire after 3 hours
failDelay = initDuration(minutes=30)
var