mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-08 22:21:38 +00:00
add 60 second buffer for rds token refresh
This commit is contained in:
parent
65d718344f
commit
5b93655f42
1 changed files with 1 additions and 1 deletions
|
|
@ -145,7 +145,7 @@ class RDSIAMConfig:
|
|||
|
||||
def check_token(self, dialect, connection_record, connection_args, connection_kwargs) -> None:
|
||||
now = datetime.now(tz=timezone.utc)
|
||||
if not self.token or now >= self.token.expiration:
|
||||
if not self.token or now >= self.token.expiration - timedelta(seconds=60):
|
||||
self.token = self.get_token()
|
||||
connection_kwargs["password"] = self.token.token.get_secret_value()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue