diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a327edf2..d266ea13f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,9 +44,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the language localization for Spanish (`es`) - Upgraded `bull-board` from version `7.0.0` to `7.1.5` - Upgraded `Nx` from version `22.7.1` to `22.7.2` +- Increased the default timeout of the portfolio snapshot computation from 30 to 300 seconds to support portfolios with a large transaction history ### Fixed +- Resolved a permanent internal server error on the portfolio and account endpoints by removing failed portfolio snapshot jobs from the queue so that a stalled computation is retried on the next request - Resolved an issue with the cash balance calculation of an account for `SELL` activities to ensure fees are correctly subtracted - Resolved an exception in the portfolio details endpoint when an asset profile is unmatched diff --git a/libs/common/src/lib/config.ts b/libs/common/src/lib/config.ts index 113dffe4a..0e3df727a 100644 --- a/libs/common/src/lib/config.ts +++ b/libs/common/src/lib/config.ts @@ -90,7 +90,7 @@ export const DEFAULT_PORT = 3333; export const DEFAULT_PROCESSOR_GATHER_ASSET_PROFILE_CONCURRENCY = 1; export const DEFAULT_PROCESSOR_GATHER_HISTORICAL_MARKET_DATA_CONCURRENCY = 1; export const DEFAULT_PROCESSOR_PORTFOLIO_SNAPSHOT_COMPUTATION_CONCURRENCY = 1; -export const DEFAULT_PROCESSOR_PORTFOLIO_SNAPSHOT_COMPUTATION_TIMEOUT = 30000; +export const DEFAULT_PROCESSOR_PORTFOLIO_SNAPSHOT_COMPUTATION_TIMEOUT = 300000; export const DEFAULT_REDACTED_PATHS = [ 'accounts[*].balance', @@ -218,7 +218,8 @@ export const INVESTMENT_ACTIVITY_TYPES = [ export const PORTFOLIO_SNAPSHOT_PROCESS_JOB_NAME = 'PORTFOLIO'; export const PORTFOLIO_SNAPSHOT_PROCESS_JOB_OPTIONS: JobOptions = { - removeOnComplete: true + removeOnComplete: true, + removeOnFail: true }; export const HEADER_KEY_IMPERSONATION = 'Impersonation-Id';