Like subject said, how can I code with WokerListener?
import { Job, JobPro, QueuePro, WorkerPro } from "@taskforcesh/bullmq-pro";
(async () => {
const queue = new QueuePro("test");
const worker = new WorkerPro(
"test",
async (job: JobPro) => {
await sleep(10e3);
},
{
group: {
concurrency: 1,
},
concurrency: 20,
}
) ;
// typeError on JobPro in VScode
//
// Argument of type '(job: JobPro) => void' is not assignable to parameter of type '(job: Job<any, any, string>, prev: string) => void'.
// Types of parameters 'job' and 'job' are incompatible.
// Type 'Job<any, any, string>' is missing the following properties from type 'JobPro<any, any, string>': gid,
// moveBatchToCompleted, moveBatchToFailed, setBatch, and 2 more
worker.on("active", (job: JobPro) => {
console.log("actived", job.data);
});
})();
Like subject said, how can I code with WokerListener?