Skip to content

Commit

Permalink
fixup! fixup! fix: add an ability to set the custom default timeout f…
Browse files Browse the repository at this point in the history
…or Axios

Signed-off-by: Oleksii Orel <[email protected]>
  • Loading branch information
olexii4 committed Mar 6, 2025
1 parent 140ca73 commit ba3a8ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ describe('Server Config API Service', () => {
expect(res).toEqual(30000);
});
test('getting custom value', () => {
process.env['CHE_DASHBOARD_CHE_API_AXIOS_REQUEST_TIMEOUT'] = '55000';
process.env['CHE_DASHBOARD_AXIOS_REQUEST_TIMEOUT'] = '55000';
const res = serverConfigService.getAxiosRequestTimeout();
expect(res).toEqual(55000);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class ServerConfigApiService implements IServerConfigApi {
}

getAxiosRequestTimeout(): number {
const requestTimeoutStr = process.env['CHE_DASHBOARD_CHE_API_AXIOS_REQUEST_TIMEOUT'];
const requestTimeoutStr = process.env['CHE_DASHBOARD_AXIOS_REQUEST_TIMEOUT'];
if (requestTimeoutStr === undefined) {
return requestTimeoutSeconds * 1000;
}
Expand Down
4 changes: 1 addition & 3 deletions packages/dashboard-frontend/src/services/bootstrap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ export default class Bootstrap {
}

async init(): Promise<void> {
await this.fetchServerConfig().then(() => {
this.doBackendsSanityCheck();
});
await this.fetchServerConfig().then(() => this.doBackendsSanityCheck());
this.prefetchResources();

await Promise.all([
Expand Down

0 comments on commit ba3a8ff

Please sign in to comment.