Skip to content

Commit

Permalink
chore: close connections when bull-queue is about to close
Browse files Browse the repository at this point in the history
  • Loading branch information
Acidiney Dias committed Feb 6, 2024
1 parent 735bc2c commit a70fed3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions providers/queue_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,12 @@ export default class QueueProvider {
return new BullManager(config, logger, app)
})
}

async shutdown() {
const bullQueue = await this.app.container.make('bull_queue')

bullQueue.list().forEach(async (queue) => {
await queue.close()
})
}
}

0 comments on commit a70fed3

Please sign in to comment.