Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore doesn't work? #113

Open
tkgalk opened this issue Jan 16, 2018 · 1 comment
Open

Restore doesn't work? #113

tkgalk opened this issue Jan 16, 2018 · 1 comment

Comments

@tkgalk
Copy link

tkgalk commented Jan 16, 2018

      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?

@Caveman07
Copy link

Caveman07 commented Apr 25, 2018

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

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants