From 22277b415265739fa420e5e480547caf2e20770d Mon Sep 17 00:00:00 2001 From: mgtennant <100305096+mgtennant@users.noreply.github.com> Date: Wed, 6 Dec 2023 16:23:44 -0800 Subject: [PATCH] double dairy timeouts --- .../src/features/documents/DownloadDairyNoticesPage.jsx | 2 +- app/client/src/features/documents/dairyNoticesSlice.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/client/src/features/documents/DownloadDairyNoticesPage.jsx b/app/client/src/features/documents/DownloadDairyNoticesPage.jsx index fe76280a..41591c24 100644 --- a/app/client/src/features/documents/DownloadDairyNoticesPage.jsx +++ b/app/client/src/features/documents/DownloadDairyNoticesPage.jsx @@ -25,7 +25,7 @@ async function download(jobId) { null, { responseType: "arraybuffer", // needed for binaries unless you want pain - timeout: 30000, // override default timeout as this call could take a while + timeout: 60000, // override default timeout as this call could take a while } ); diff --git a/app/client/src/features/documents/dairyNoticesSlice.js b/app/client/src/features/documents/dairyNoticesSlice.js index 96940f8a..68bfcf26 100644 --- a/app/client/src/features/documents/dairyNoticesSlice.js +++ b/app/client/src/features/documents/dairyNoticesSlice.js @@ -13,7 +13,7 @@ export const fetchQueuedDairyNotices = createAsyncThunk( const response = await Api.post( "documents/dairyNotices/queued", payload, - 30000 + 60000 ); return response.data; } catch (error) { @@ -29,7 +29,11 @@ export const startDairyNoticeJob = createAsyncThunk( "dairyNotices/startDairyNoticeJob", async (data, thunkApi) => { try { - const response = await Api.post("documents/dairyNotices/startJob", data, 30000); + const response = await Api.post( + "documents/dairyNotices/startJob", + data, + 60000 + ); return response.data; } catch (error) { if (error instanceof ApiError) {