fix: adjust expires_at check to allow for a 60-second buffer

This commit is contained in:
Yeuoly 2025-07-22 01:14:26 +08:00
parent 20ca2033ce
commit fe1a3ca943
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ class ToolManager:
decrypted_credentials: Mapping[str, Any] = encrypter.decrypt(builtin_provider.credentials)
# check if the credentials is expired
if builtin_provider.expires_at != -1 and builtin_provider.expires_at < int(time.time()):
if builtin_provider.expires_at != -1 and (builtin_provider.expires_at - 60) < int(time.time()):
# TODO: circular import
from services.tools.builtin_tools_manage_service import BuiltinToolManageService