kue-scheduler
kue-scheduler copied to clipboard
Restore doesn't work?
this.queue.restore(function (err, schedules) {
if (err) {
debug(`ERR: ${err.message}`)
}
debug('Restoring jobs...')
schedules.forEach(schedule => {
console.log(schedule)
this.createJob()
})
})
This is how I try to restore jobs from Redis (I need a job to run every 5 minutes regardless if the API crashed or not, it has to restore that task, keep it unique and going).
But I can't seem to be able to force it to start. If I start it manually - it works. It also finds it (it sees it in schedules
variable), but it just doesn't start it. Any ideas?
Encountering the same problem. Restore doesn't work on node restart.
const redisConfig = {
redis: {
host: 'redisdb'
},
restore: true
};
const Queue = kue.createQueue(redisConfig);
....