Browse Source

Task/configure queues to keep completed jobs (#6931)

* Configure removeOnComplete

* Update changelog
pull/6853/merge
Thomas Kaul 2 days ago
committed by GitHub
parent
commit
7f76bcd2bf
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 20
      libs/common/src/lib/config.ts

1
CHANGELOG.md

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Configured the queues to keep the last `5000` completed jobs with a maximum age of one week
- Removed the deprecated attributes (`assetClass`, `countries`, `currency`, `dataSource`, `name`, `sectors`, `symbol` and `url`) from the holdings of the public portfolio endpoint response - Removed the deprecated attributes (`assetClass`, `countries`, `currency`, `dataSource`, `name`, `sectors`, `symbol` and `url`) from the holdings of the public portfolio endpoint response
- Upgraded `@keyv/redis` from version `4.4.0` to `5.1.6` - Upgraded `@keyv/redis` from version `4.4.0` to `5.1.6`

20
libs/common/src/lib/config.ts

@ -175,7 +175,10 @@ export const GATHER_ASSET_PROFILE_PROCESS_JOB_OPTIONS: JobOptions = {
delay: ms('1 minute'), delay: ms('1 minute'),
type: 'exponential' type: 'exponential'
}, },
removeOnComplete: true removeOnComplete: {
age: ms('1 week') / 1000,
count: 5000
}
}; };
export const GATHER_HISTORICAL_MARKET_DATA_PROCESS_JOB_NAME = export const GATHER_HISTORICAL_MARKET_DATA_PROCESS_JOB_NAME =
@ -186,7 +189,10 @@ export const GATHER_HISTORICAL_MARKET_DATA_PROCESS_JOB_OPTIONS: JobOptions = {
delay: ms('1 minute'), delay: ms('1 minute'),
type: 'exponential' type: 'exponential'
}, },
removeOnComplete: true removeOnComplete: {
age: ms('1 week') / 1000,
count: 5000
}
}; };
export const GATHER_STATISTICS_PROCESS_JOB_OPTIONS: JobOptions = { export const GATHER_STATISTICS_PROCESS_JOB_OPTIONS: JobOptions = {
@ -195,7 +201,10 @@ export const GATHER_STATISTICS_PROCESS_JOB_OPTIONS: JobOptions = {
delay: ms('1 minute'), delay: ms('1 minute'),
type: 'exponential' type: 'exponential'
}, },
removeOnComplete: true removeOnComplete: {
age: ms('1 week') / 1000,
count: 5000
}
}; };
export const GATHER_STATISTICS_DOCKER_HUB_PULLS_PROCESS_JOB_NAME = export const GATHER_STATISTICS_DOCKER_HUB_PULLS_PROCESS_JOB_NAME =
@ -218,7 +227,10 @@ export const INVESTMENT_ACTIVITY_TYPES = [
export const PORTFOLIO_SNAPSHOT_PROCESS_JOB_NAME = 'PORTFOLIO'; export const PORTFOLIO_SNAPSHOT_PROCESS_JOB_NAME = 'PORTFOLIO';
export const PORTFOLIO_SNAPSHOT_PROCESS_JOB_OPTIONS: JobOptions = { export const PORTFOLIO_SNAPSHOT_PROCESS_JOB_OPTIONS: JobOptions = {
removeOnComplete: true removeOnComplete: {
age: ms('1 week') / 1000,
count: 5000
}
}; };
export const HEADER_KEY_IMPERSONATION = 'Impersonation-Id'; export const HEADER_KEY_IMPERSONATION = 'Impersonation-Id';

Loading…
Cancel
Save