mirror of
https://github.com/langgenius/dify.git
synced 2026-10-16 15:35:32 +08:00
fixup! sim117
This commit is contained in:
@@ -229,3 +229,33 @@ class AliyunLogStorePG:
|
||||
for col, val in zip(columns, row, strict=False):
|
||||
row_dict[col] = "" if val is None else str(val)
|
||||
result.append(row_dict)
|
||||
|
||||
except psycopg2.Error as e:
|
||||
if not self._is_retriable_error(e):
|
||||
logger.exception(
|
||||
"Failed to execute SQL on logstore %s (non-retriable error): sql=%s",
|
||||
logstore,
|
||||
sql,
|
||||
)
|
||||
raise
|
||||
|
||||
if attempt < max_retries - 1:
|
||||
logger.warning(
|
||||
"Failed to execute SQL on logstore %s (attempt %d/%d): %s. Retrying...",
|
||||
logstore,
|
||||
attempt + 1,
|
||||
max_retries,
|
||||
str(e),
|
||||
)
|
||||
time.sleep(retry_delay)
|
||||
retry_delay *= 2
|
||||
else:
|
||||
logger.exception(
|
||||
"Failed to execute SQL on logstore %s after %d attempts: sql=%s",
|
||||
logstore,
|
||||
max_retries,
|
||||
sql,
|
||||
)
|
||||
raise
|
||||
|
||||
return []
|
||||
|
||||
@@ -295,3 +295,4 @@ def test_invoke_skips_forwarding_outside_enterprise_edition(config_overrides):
|
||||
# Should not raise; should not call enterprise.
|
||||
with contextlib.suppress(Exception):
|
||||
tool.invoke_remote_mcp_tool({}, user_id=None, app_id=None)
|
||||
inject.assert_not_called()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user