File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed
adapter-bullmq-events/src Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1- export const DEFAULT_CONCURRENCY = 5
1+ export const DEFAULT_CONCURRENCY = 10
22export const DEFAULT_ATTEMPTS = 3
33export const DEFAULT_BACKOFF_DELAY = 2000
44export const DEFAULT_REMOVE_ON_COMPLETE_COUNT = 1000
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class WorkerManager {
6060
6161 this . addTopicSubscription ( topic , id )
6262
63- const concurrency = options ?. type === 'fifo' ? FIFO_CONCURRENCY : this . config . concurrency
63+ const concurrency = options ?. type === 'fifo' ? FIFO_CONCURRENCY : options ?. concurrency || this . config . concurrency
6464 const attempts = options ?. maxRetries != null ? options . maxRetries + 1 : this . config . defaultJobOptions . attempts
6565 const lockDuration = options ?. visibilityTimeout ? options . visibilityTimeout * MILLISECONDS_PER_SECOND : undefined
6666
Original file line number Diff line number Diff line change @@ -41,12 +41,20 @@ export type HandlerConfig = {
4141 timeout : number
4242}
4343
44- export type QueueConfig = {
45- type : 'fifo' | 'standard'
46- maxRetries : number
47- visibilityTimeout : number
48- delaySeconds : number
49- }
44+ export type QueueConfig =
45+ | {
46+ type : 'fifo'
47+ maxRetries : number
48+ visibilityTimeout : number
49+ delaySeconds : number
50+ }
51+ | {
52+ type : 'standard'
53+ maxRetries : number
54+ visibilityTimeout : number
55+ delaySeconds : number
56+ concurrency ?: number
57+ }
5058
5159export type InfrastructureConfig = {
5260 handler ?: Partial < HandlerConfig >
You can’t perform that action at this time.
0 commit comments