Errors/Exceptions ignored
Created by: palamccc
In following example, I'm returning a data which contains circular reference, so it can't serialized. Bull is not handling this error and running the job in infinite loop. Ideally the following job should fail, by throwing error that , return value can't be serialized.
var Queue = require("bull");
var q = Queue("bullbug", 6379, '127.0.0.1');
q.on("error", function(err){ console.log("error", err) });
q.on("failed", function(job,err){ console.log("failed", job.jobId, err)});
q.process(function(job){
console.log("hello", job.data);
var circular = {};
circular.x = circular;
return Promise.resolve(circular);
});
q.add("john");