Closed AhmedSKBHL closed 2 hours ago
sorry, it was an error from my side
It works, but you need to pass the correct arguments:
it("should return a valid job with the job's options and data passed as the job template", async function () {
const repeatOpts = {
every: 1000,
};
const job = await queue.upsertJobScheduler('test', repeatOpts, {
data: { foo: 'bar' },
});
expect(job).to.be.ok;
expect(job!.data.foo).to.be.eql('bar');
expect(job!.opts.repeat!.every).to.be.eql(1000);
});
Your code above should have given you a compiler error ...
@manast, yeah my bad the issue is on my side, sorry i'm working on legacy project, there's a layer on the top of the queue that hided the error, thanks a lot for fast reaction
Version
v5.27.0
Platform
NodeJS
What happened?
Job.data field is an empty object when job is received by processor
How to reproduce.
await queue.upsertJobScheduler( jobId, { pattern: '/20 ' }, data, );
Relevant log output
No response
Code of Conduct