From 00fd989dc9bbcc4e163bbf49354d66811a06b5a8 Mon Sep 17 00:00:00 2001 From: Felix Mosheev <9304194+felixmosh@users.noreply.github.com> Date: Sat, 16 Nov 2024 00:42:13 +0200 Subject: [PATCH] fix: revert support for older BullMQ versions --- packages/api/src/queueAdapters/bullMQ.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/src/queueAdapters/bullMQ.ts b/packages/api/src/queueAdapters/bullMQ.ts index f201ee24..6e21523f 100644 --- a/packages/api/src/queueAdapters/bullMQ.ts +++ b/packages/api/src/queueAdapters/bullMQ.ts @@ -14,7 +14,7 @@ export class BullMQAdapter extends BaseAdapter { constructor(private queue: Queue, options: Partial = {}) { const libName = 'bullmq'; super(libName, options); - if (!(queue.metaValues?.version as string).startsWith(libName)) { + if (!(queue instanceof Queue) || !(queue.metaValues?.version as string)?.startsWith(libName)) { throw new Error(`You've used the BullMQ adapter with a non-BullMQ queue.`); } }