Skip to content

Commit

Permalink
fix: Use the options defined in the job
Browse files Browse the repository at this point in the history
  • Loading branch information
HigoRibeiro authored and João Pedro Schmitz committed Feb 24, 2021
1 parent e59454c commit 55fbbc5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/BullManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
QueueContract,
BullConfig,
EventListener,
QueueOptions,
} from '@ioc:Rocketseat/Bull'

import {
Expand Down Expand Up @@ -39,8 +40,9 @@ export class BullManager implements BullManagerContract {
this._queues = this.jobs.reduce((queues, path) => {
const jobDefinition: JobContract = this.container.make(path)

const queueConfig = {
const queueConfig: QueueOptions = {
connection: this.config.connections[this.config.connection],
defaultJobOptions: jobDefinition.options,
...jobDefinition.queueOptions,
}

Expand Down

0 comments on commit 55fbbc5

Please sign in to comment.