var queue = kue.createQueue()
queue.process('myjob', function() {
// first processor for "myjob"
})
file2
var queue = kue.createQueue()
queue.process('myjob', function() {
// second processor for "myjob"
})
When i run their together, it throws the error:
C:\Projects\avito-parser\node_modules\kue\lib\kue.js:185
client.zrangebyscore(client.getKey('jobs:delayed'), 0, Date.now(), 'LIMIT', 0, limit, function( err, ids ) {
^
TypeError: Cannot read property 'zrangebyscore' of null
at C:\Projects\avito-parser\node_modules\kue\lib\kue.js:185:15
at Command.callback (C:\Projects\avito-parser\node_modules\node-redis-warlock\lib\warlock.js:39:16)
at normal_reply (C:\Projects\avito-parser\node_modules\redis\index.js:714:21)
at RedisClient.return_reply (C:\Projects\avito-parser\node_modules\redis\index.js:816:9)
at JavascriptRedisParser.Parser.returnReply (C:\Projects\avito-parser\node_modules\redis\index.js:188:18)
at JavascriptRedisParser.execute (C:\Projects\avito-parser\node_modules\redis-parser\lib\parser.js:415:12)
at Socket.<anonymous> (C:\Projects\avito-parser\node_modules\redis\index.js:267:27)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:153:18)
Is it possible to use Kue in this way?
PS looks like the issue happened only when i shutdown the queue and then create it again.
I have 2 different job processors for the job
file1
file2
When i run their together, it throws the error:
Is it possible to use Kue in this way? PS looks like the issue happened only when i shutdown the queue and then create it again.