Feature/increase timeout to load currencies (#2800)

* Increase timeout

* Update changelog
This commit is contained in:
Thomas Kaul 2023-12-31 10:23:56 +01:00 committed by GitHub
parent 53ce37a83a
commit b89bf1d5e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Changed the performance calculation to a time-weighted approach - Changed the performance calculation to a time-weighted approach
- Increased the timeout to load currencies in the exchange rate data service
- Exposed the environment variable `REQUEST_TIMEOUT` - Exposed the environment variable `REQUEST_TIMEOUT`
- Used the `HasPermission` annotation in endpoints - Used the `HasPermission` annotation in endpoints
- Improved the language localization for German (`de`) - Improved the language localization for German (`de`)

View File

@ -11,6 +11,7 @@ import { DATE_FORMAT, getYesterday } from '@ghostfolio/common/helper';
import { Injectable, Logger } from '@nestjs/common'; import { Injectable, Logger } from '@nestjs/common';
import { format, isToday } from 'date-fns'; import { format, isToday } from 'date-fns';
import { isNumber, uniq } from 'lodash'; import { isNumber, uniq } from 'lodash';
import ms from 'ms';
@Injectable() @Injectable()
export class ExchangeRateDataService { export class ExchangeRateDataService {
@ -75,7 +76,8 @@ export class ExchangeRateDataService {
const quotes = await this.dataProviderService.getQuotes({ const quotes = await this.dataProviderService.getQuotes({
items: this.currencyPairs.map(({ dataSource, symbol }) => { items: this.currencyPairs.map(({ dataSource, symbol }) => {
return { dataSource, symbol }; return { dataSource, symbol };
}) }),
requestTimeout: ms('30 seconds')
}); });
for (const symbol of Object.keys(quotes)) { for (const symbol of Object.keys(quotes)) {