feat: fix scheduler

This commit is contained in:
Nevo David 2025-03-13 19:45:57 +07:00
parent 186cff3b45
commit 3de66b7e68
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ export class BullMqClient extends ClientProxy {
async dispatchEvent(packet: ReadPacket<any>): Promise<any> {
console.log('event to dispatch: ', packet);
const queue = this.getQueue(packet.pattern);
if (packet.data.options.every) {
if (packet?.data?.options?.every) {
const { every, immediately } = packet.data.options;
const id = packet.data.id ?? v4();
await queue.upsertJobScheduler(