🐂 Migration to moleculer-bullMQ #6

Merged
rishighan merged 21 commits from migration-to-bullmq into master 2023-08-30 17:50:47 +00:00
Showing only changes of commit fe9fbe9c3a - Show all commits

View File

@@ -196,6 +196,11 @@ export default class JobQueueService extends Service {
});
// 6. Purge it from Redis
await job.remove();
// 7. Check
const jobCounts = this.getJobCounts("active", "completed", "failed");
console.log("ASDASD");
console.log(jobCounts);
console.log(`Job ID ${ctx.params.id} completed.`);
},
@@ -223,18 +228,6 @@ export default class JobQueueService extends Service {
], //optional
});
},
async "enqueue.async.drained"(ctx) {
console.log(`Queue drained, all jobs processed.`);
await this.broker.call("socket.broadcast", {
namespace: "/",
event: "action",
args: [
{
type: "LS_IMPORT_QUEUE_DRAINED",
},
],
});
},
},
});
}