Failing fast when Redis is down
const myQueue = new Queue("transcoding", {
connection: {
enableOfflineQueue: false,
},
});
app.post("/jobs", async (req, res) => {
try {
const job = await myQueue.add("myjob", { req.body });
res.status(201).json(job.id);
}catch(err){
res.status(503).send(err);
}
})Last updated
Was this helpful?