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.
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:
Any suggestions?