Automattic / kue

Kue is a priority job queue backed by redis, built for node.js.
http://automattic.github.io/kue
MIT License
9.45k stars 862 forks source link

JSON API returns no data with custom redis server AWS elasticache #1173

Open aakashbanerjee opened 6 years ago

aakashbanerjee commented 6 years ago

Hi,

So I have this node express app with kue and kue-ui-express. When I use default redis-server the json api returns data without problems. However when I moved to AWS and have a separate redis elasticache installation my app can connect to redis and kue saves data to the redis instance on aws but any query to the JSON API returns empty array. Code and example below. I am not sure what needs to be added to code to get the JSON APi working.

//server.js var kue = require('kue'), queue = kue.createQueue({ prefix: 'q', redis: { port: 6379, host: '', options: { disableSearch: false } } }); //redis connection works AWS, i can see data in kue-ui-express for each job

var kueUiExpress = require('kue-ui-express'); kueUiExpress(app, '/kue/', '/kue-api/'); app.use('/kue-api/', kue.app); const port = process.env.PORT || '3000'; app.set('port', port); const server = http.createServer(app); server.listen(port, () => console.log(Running server on port: ${port}));

//JSON API calls that work with default redis-server but does not return data with AWS. http://mydomain.com/kue-api/job/search?q=useremail returns an empty array with AWS redis but returns data with default redis.

Any help is much appreciated.

Thanks.

Aakash.

aakashbanerjee commented 6 years ago

Guys Can anyone help with this please? I will truly appreciate any help. Here is my stackoverflow post with details as well.

https://stackoverflow.com/questions/50006249/kue-json-api-doesnt-return-any-data-kue-with-aws-redis