fix: change import timeout as 10 min (#1221)

This commit is contained in:
SemmyWong 2022-12-08 20:34:21 +08:00 committed by GitHub
parent 29e83515b9
commit cabe8a51a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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?.();