kue-scheduler icon indicating copy to clipboard operation
kue-scheduler copied to clipboard

Restore doesn't work?

Open tkgalk opened this issue 6 years ago • 1 comments

      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?

tkgalk avatar Jan 16 '18 10:01 tkgalk

Encountering the same problem. Restore doesn't work on node restart.

const redisConfig = {
      redis: {
        host: 'redisdb'
      },
      restore: true
  };

  const Queue = kue.createQueue(redisConfig);
....

Caveman07 avatar Apr 25 '18 11:04 Caveman07