From 9f294ae169a09f4b11cd843a3f4304750b315134 Mon Sep 17 00:00:00 2001 From: Felix Mosheev <9304194+felixmosh@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:16:30 +0200 Subject: [PATCH] fix: allow usage of bullmq-pro, closes #849 --- packages/api/src/queueAdapters/bullMQ.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/api/src/queueAdapters/bullMQ.ts b/packages/api/src/queueAdapters/bullMQ.ts index 1618d032..f201ee24 100644 --- a/packages/api/src/queueAdapters/bullMQ.ts +++ b/packages/api/src/queueAdapters/bullMQ.ts @@ -12,8 +12,9 @@ import { BaseAdapter } from './base'; export class BullMQAdapter extends BaseAdapter { constructor(private queue: Queue, options: Partial = {}) { - super('bullmq', options); - if (!(queue instanceof Queue)) { + const libName = 'bullmq'; + super(libName, options); + if (!(queue.metaValues?.version as string).startsWith(libName)) { throw new Error(`You've used the BullMQ adapter with a non-BullMQ queue.`); } }