From 8cb1b3f9255a9088356ca4a80170661b71e8f0f2 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 3 Sep 2022 09:09:57 +0200 Subject: [PATCH] Feature/decrease rate limiter duration (#1217) * Decrease rate limiter duration * Update changelog --- CHANGELOG.md | 4 ++++ apps/api/src/services/data-gathering.module.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66c6e6e55..619af8173 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +- Decreased the rate limiter duration of queue jobs from 5 to 4 seconds + ### Fixed - Made the environment variables `REDIS_HOST` and `REDIS_PORT` mandatory diff --git a/apps/api/src/services/data-gathering.module.ts b/apps/api/src/services/data-gathering.module.ts index 6f81a90d6..0083a8d75 100644 --- a/apps/api/src/services/data-gathering.module.ts +++ b/apps/api/src/services/data-gathering.module.ts @@ -17,7 +17,7 @@ import { SymbolProfileModule } from './symbol-profile.module'; imports: [ BullModule.registerQueue({ limiter: { - duration: ms('5 seconds'), + duration: ms('4 seconds'), max: 1 }, name: DATA_GATHERING_QUEUE