Skip to content

Commit

Permalink
Merge pull request #428 from bcgov/increase-all-timeouts
Browse files Browse the repository at this point in the history
bump all timeouts 30->60
  • Loading branch information
barrfalk authored Dec 7, 2023
2 parents 4829e21 + 32507ba commit ac1d7d4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/client/src/components/DocGenDownloadBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
);

Expand Down
2 changes: 1 addition & 1 deletion app/client/src/features/documents/DownloadRenewalsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
);

Expand Down
6 changes: 1 addition & 5 deletions app/client/src/features/documents/dairyNoticesSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ export const startDairyNoticeJob = createAsyncThunk(
"dairyNotices/startDairyNoticeJob",
async (data, thunkApi) => {
try {
const response = await Api.post(
"documents/dairyNotices/startJob",
data,
60000
);
const response = await Api.post("documents/dairyNotices/startJob", data, 60000);
return response.data;
} catch (error) {
if (error instanceof ApiError) {
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/utilities/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class ApiError extends Error {
}
}

const DEFAULT_TIMEOUT = 30000;
const DEFAULT_TIMEOUT = 60000;

const axiosInstance = axios.create({
baseURL: "/api/v1",
Expand Down

0 comments on commit ac1d7d4

Please sign in to comment.