mirror of https://github.com/langgenius/dify.git
fix(api): move cache invalidation outside redis lock to prevent timeout (#30150)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f5fdd02022
commit
b90e6aa14c
|
|
@ -286,12 +286,12 @@ class BuiltinToolManageService:
|
||||||
|
|
||||||
session.add(db_provider)
|
session.add(db_provider)
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
# Invalidate tool providers cache
|
|
||||||
ToolProviderListCache.invalidate_cache(tenant_id)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
session.rollback()
|
session.rollback()
|
||||||
raise ValueError(str(e))
|
raise ValueError(str(e))
|
||||||
|
|
||||||
|
# Invalidate tool providers cache
|
||||||
|
ToolProviderListCache.invalidate_cache(tenant_id, "builtin")
|
||||||
return {"result": "success"}
|
return {"result": "success"}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue