From 9ff8ae82c17872504def9270fb646de636f5ea8d Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 15 Jan 2026 14:07:05 +0800 Subject: [PATCH] fix(assistant): After the assistant is embedded in DataEase, the query times out. --- backend/apps/system/crud/assistant.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/apps/system/crud/assistant.py b/backend/apps/system/crud/assistant.py index 5cd27af8..a90528b3 100644 --- a/backend/apps/system/crud/assistant.py +++ b/backend/apps/system/crud/assistant.py @@ -130,7 +130,8 @@ def get_ds_from_api(self): cookies[item['key']] = item['value'] if item['target'] == 'param': param[item['key']] = item['value'] - res = requests.get(url=endpoint, params=param, headers=header, cookies=cookies, timeout=10) + timeout = int(config.get('timeout')) if config.get('timeout') else 10 + res = requests.get(url=endpoint, params=param, headers=header, cookies=cookies, timeout=timeout) if res.status_code == 200: result_json: dict[any] = json.loads(res.text) if result_json.get('code') == 0 or result_json.get('code') == 200: