@conorcodes eventually I just solved it extracting the db value and setting it as Kue was expecting.
import URL from 'url';
const parsed = 'redis://yourredisurl?db=10'
parsed.pathname = parsed.query.db;
const jobQueue = kue.createQueue({
redis: URL.format(parsed),
});
I submitted the bug on github and provided a pull request, but nothing happened :P, this solves it temporarily.
sudo lsof -i tcp:6379 | wc -l
"test": "export NODE_ENV=test && mocha server/test
i am exporting 'test' to NODE_ENV. my app picks it up and loads the respective configuration but the new worker processes do no pick up the NODE_ENV and are using a different loaded config (default = development)
queue.process()
can I get the first parameter as a variable? I'm having like 6 different jobs, and would love to be able to write just one queue process just to keep my code down, as right now there are 6 exact equal functions just calling other functions with strings instead of variables.
queue.process(type, 1, (job, done) => { jobs[type](job.data).then(result) => {done();} });
KEYS *
will give you what's inside, HGETALL key
will give you all information about job. HGET key data
will return your message.