lykmapipo / kue-scheduler

A job scheduler utility for kue, backed by redis and built for node.js
246 stars 47 forks source link

TypeError: Cannot read property 'prefix' of undefined on Queue.every #109

Closed Caveman07 closed 6 years ago

Caveman07 commented 6 years ago

Couldn't find any info on why is this happening. Script works when Queue.schedule is used, however when I changed to Queue.every I get this error:

var key = this.options.prefix + ':scheduler:' + uuid;
                        ^

TypeError: Cannot read property 'prefix' of undefined
    at Queue._getJobExpiryKey (/Users/ramzy/core_project/node_modules/kue-scheduler/index.js:190:25)
    at Queue.checkIfJobAlreadyScheduled (/Users/ramzy/core_project/node_modules/kue-scheduler/index.js:822:14)
    at nextTask (/Users/ramzy/core_project/node_modules/async/dist/async.js:5297:14)
    at next (/Users/ramzy/core_project/node_modules/async/dist/async.js:5304:9)
    at /Users/ramzy/core_project/node_modules/async/dist/async.js:906:16
    at Queue.prepareJobDefinition (/Users/ramzy/core_project/node_modules/kue-scheduler/index.js:816:7)
    at nextTask (/Users/ramzy/core_project/node_modules/async/dist/async.js:5297:14)
    at next (/Users/ramzy/core_project/node_modules/async/dist/async.js:5304:9)
    at /Users/ramzy/core_project/node_modules/async/dist/async.js:906:16
    at ensureJobInstance (/Users/ramzy/core_project/node_modules/kue-scheduler/index.js:797:9)
    at nextTask (/Users/ramzy/core_project/node_modules/async/dist/async.js:5297:14)
    at next (/Users/ramzy/core_project/node_modules/async/dist/async.js:5304:9)
    at /Users/ramzy/core_project/node_modules/async/dist/async.js:906:16
    at ensureInterval (/Users/ramzy/core_project/node_modules/kue-scheduler/index.js:789:9)
    at nextTask (/Users/ramzy/core_project/node_modules/async/dist/async.js:5297:14)
    at Object.waterfall (/Users/ramzy/core_project/node_modules/async/dist/async.js:5307:5)
error Command failed with exit code 1.

Any suggestions?

pavelescurazvan commented 6 years ago

Any news on this issue? I am having the same error.