Skip to content

Commit

Permalink
chore: return job instance when dispatching
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainLanz committed Apr 22, 2024
1 parent 155975e commit 6c4e7ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class QueueManager {
: never
: never,
options: JobsOptions & { queueName?: string } = {}
): Promise<void> {
) {
const queueName = options.queueName || 'default'

const computedConfig = {
Expand All @@ -90,7 +90,7 @@ export class QueueManager {
const jobClass = await this.#resolveJob(job)
const jobPath = this.#getJobPath(jobClass)

await this.#queues.get(queueName)!.add(jobPath, payload, {
return this.#queues.get(queueName)!.add(jobPath, payload, {
...this.#options.jobs,
...options,
})
Expand Down

0 comments on commit 6c4e7ae

Please sign in to comment.