Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/repeatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = function(Queue) {
let now = Date.now();
now = prevMillis < now ? now : prevMillis;

const nextMillis = getNextMillis(now, repeat);
const nextMillis = this.getNextMillis(now, repeat);
if (nextMillis) {
const jobId = repeat.jobId ? repeat.jobId + ':' : ':';
const repeatJobKey = getRepeatKey(name, repeat, jobId);
Expand Down Expand Up @@ -184,7 +184,7 @@ module.exports = function(Queue) {
return name + ':' + jobId + endDate + suffix;
}

function getNextMillis(millis, opts) {
Queue.prototype.getNextMillis = function(millis, opts) {
if (opts.cron && opts.every) {
throw new Error(
'Both .cron and .every options are defined for this repeatable job'
Expand Down