You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it looks like we cant have functions as properties in a job data. they are in fact there when i create them, as you can see in the log below (its called the fillerFunction):
but when i log the job again in the worker callback, the fillerFunction property is nowhere to be seen:
i create the jobs like this:
constflow=awaitflowProducer.add({name: 'certificate setup',
queueName,children: [{name: 'activate Certificate',data: {type: 'activate',description: 'certificate activation',url: '',method: 'post',collection: 'ssl_tls_certificate_v2',filter: {// some code},details: {// some code},fillerFunction: function(){console.log('testing');},cool: 'ok its cool',},
queueName,},],});console.log('🚀 ~ file: setup.ts ~ line 46 ~ setup ~ flow',flow.children![0]);
and the worker code is like this:
constworker=newWorker(queueName,async(job)=>{console.log('🚀 ~ file: generateWorker.ts ~ line 33 ~ job.data',job.data);if(job.data.fillerFunction)job.data.fillerFunction();constresult=awaithandleJob(job.data);returnresult;},{connection: config.redisConnection,},);
The text was updated successfully, but these errors were encountered:
it looks like we cant have functions as properties in a job data. they are in fact there when i create them, as you can see in the log below (its called the
fillerFunction
):but when i log the job again in the worker callback, the
fillerFunction
property is nowhere to be seen:i create the jobs like this:
and the worker code is like this:
The text was updated successfully, but these errors were encountered: