fix discussion

This commit is contained in:
yunlu.wen 2026-03-10 10:38:16 +08:00
parent 014a6a11df
commit bc2fbbbfba

View File

@ -66,19 +66,16 @@ class PluginManagerService:
def try_pre_uninstall_plugin(cls, body: PreUninstallPluginRequest): def try_pre_uninstall_plugin(cls, body: PreUninstallPluginRequest):
try: try:
# the invocation must be synchronous. # the invocation must be synchronous.
EnterprisePluginManagerRequest.send_request( # pyright: ignore[reportUnknownMemberType] EnterprisePluginManagerRequest.send_request(
"POST", "POST",
"/pre-uninstall-plugin", "/pre-uninstall-plugin",
json=body.model_dump(), # pyright: ignore[reportUnknownArgumentType, reportUnknownMemberType] json=body.model_dump(),
raise_for_status=True, raise_for_status=True,
timeout=dify_config.ENTERPRISE_REQUEST_TIMEOUT, timeout=dify_config.ENTERPRISE_REQUEST_TIMEOUT,
) )
except Exception as e: except Exception:
logger.exception( logger.exception(
""" "failed to perform pre uninstall plugin hook. tenant_id: %s, plugin_unique_identifier: %s, ",
failed to perform pre uninstall plugin hook. tenant_id: %s, plugin_unique_identifier: %s,
this may cause plugin to be automatically garbage collected
""",
body.tenant_id, body.tenant_id,
body.plugin_unique_identifier, body.plugin_unique_identifier,
) )