When I run kue-scheduler on heroku with the heroku redis plugin while I can get kue working, it seems that kue-scheduler requires a specific redis configuration that is not allowed in the heroku redis environment. Someone managed to run kue-scheduler in Heroku. Here is the beginning of my index.js file:
var express = require('express'); var ParseServer = require('parse-server').ParseServer; var path = require('path'); var kue = require('kue-scheduler') var queue = kue.createQueue({redis: 'redis://h:***************@ec2-**-19-83-130.compute-1.amazonaws.com:23539' }); var job = queue.create('test', { title: 'Hello world' , to: ' j@example.com ' , template: 'welcome-email' }).save( function(err){ if( !err ) console.log( job.id ); }); job.log('$Job %s run', job.id); queue.every('30 seconds', job); queue.process('test', function(job, done){ test_function(job.data.title, done); }); function test_function(title, done) { console.log('Ran test function with title %s', title)
And here is the mistake.
2016-07-21T00:46:26.445297+00:00 app[web.1]: /app/node_modules/parse-server/lib/ParseServer.js:410 2016-07-21T00:46:26.445299+00:00 app[web.1]: throw err; 2016-07-21T00:46:26.445300+00:00 app[web.1]: ^ 2016-07-21T00:46:26.445417+00:00 app[web.1]: ReplyError: ERR unknown command 'config' 2016-07-21T00:46:26.445419+00:00 app[web.1]: at parseError (/app/node_modules/redis-parser/lib/parser.js:161:12) 2016-07-21T00:46:26.445420+00:00 app[web.1]: at parseType (/app/node_modules/redis-parser/lib/parser.js:222:14) 2016-07-21T00:46:26.466188+00:00 app[web.1]:
The problem is that heroku redis does not allow you to configure your redis infrastructure from what I can say.
If someone has succeeded, I am grateful for any suggestions.
source share