mirror of https://github.com/langgenius/dify.git
fix: adjust expires_at check to allow for a 60-second buffer
This commit is contained in:
parent
20ca2033ce
commit
fe1a3ca943
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue