From cabe8a51a2695b2be44d8399c7fead0d981f4558 Mon Sep 17 00:00:00 2001 From: SemmyWong <67748948+semmywong@users.noreply.github.com> Date: Thu, 8 Dec 2022 20:34:21 +0800 Subject: [PATCH] fix: change import timeout as 10 min (#1221) --- packages/plugins/import/src/client/useImportAction.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/plugins/import/src/client/useImportAction.ts b/packages/plugins/import/src/client/useImportAction.ts index af1d4f420..92f3f9b35 100644 --- a/packages/plugins/import/src/client/useImportAction.ts +++ b/packages/plugins/import/src/client/useImportAction.ts @@ -124,7 +124,11 @@ export const useImportStartAction = () => { setVisible(false); setImportModalVisible(true); setImportStatus(ImportStatus.IMPORTING); - const { data }: any = await apiClient.axios.post(`${name}:importXlsx`, formData, {}).catch((err) => {}); + const { data }: any = await apiClient.axios + .post(`${name}:importXlsx`, formData, { + timeout: 10 * 60 * 1000, + }) + .catch((err) => {}); setImportResult(data); form.reset(); await service?.refresh?.();