Skip to content

Commit 9ff8ae8

Browse files
committed
fix(assistant): After the assistant is embedded in DataEase, the query times out.
1 parent 33565a2 commit 9ff8ae8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backend/apps/system/crud/assistant.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def get_ds_from_api(self):
130130
cookies[item['key']] = item['value']
131131
if item['target'] == 'param':
132132
param[item['key']] = item['value']
133-
res = requests.get(url=endpoint, params=param, headers=header, cookies=cookies, timeout=10)
133+
timeout = int(config.get('timeout')) if config.get('timeout') else 10
134+
res = requests.get(url=endpoint, params=param, headers=header, cookies=cookies, timeout=timeout)
134135
if res.status_code == 200:
135136
result_json: dict[any] = json.loads(res.text)
136137
if result_json.get('code') == 0 or result_json.get('code') == 200:

0 commit comments

Comments
 (0)