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.`); } }