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

this._scheduler.pttl is not a function since August 3rd update #104

Open
Cbenh opened this issue Aug 4, 2017 · 3 comments
Open

this._scheduler.pttl is not a function since August 3rd update #104

Cbenh opened this issue Aug 4, 2017 · 3 comments

Comments

@Cbenh
Copy link

Cbenh commented Aug 4, 2017

Hi, i got this issue since the update of the node module yesterday.
The setup was a simple job running every 2 minutes. Works great before.
Thanks

TypeError: this._scheduler.pttl is not a function
at Queue.isKeyExpired (/var/www/api/node_modules/kue-scheduler/index.js:230:23)

@samhunta
Copy link
Contributor

samhunta commented Aug 12, 2017

My bad 😨

@samhunta
Copy link
Contributor

What did this function do before?

@Cbenh
Copy link
Author

Cbenh commented Aug 19, 2017

I'm not using it directly. This is my config.

const kue = require('kue-scheduler');

const Queue = kue.createQueue({
  prefix: 'kue',
  redis: {
    port: '6379',
    host: 'localhost'
  }
});

Queue.process('job1', function (job, done) {
    console.log(job);
      done && done(null, "success");
  });

Queue.on('schedule success', function (job) {
    job.on('complete', function (result) {
       console.log('Job completed with data ', result);
    }).on('failed attempt', function (errorMessage, doneAttempts) {
       console.log('Job failed');
    }).on('failed', function (errorMessage) {
       console.log('Job failed');
    }).on('progress', function (progress, data) {
      console.log('\r  job #' + job.id + ' ' + progress +
         '% complete with data ', data);
    });
  });

  Queue.every('2 minutes', job1);

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