Connection to Redis
See original GitHub issuebullmq: v1.0.1
I’m not sure how to pass the redis connection. I tried different opts like from the doc (https://docs.bullmq.io/guide/connections) but it either crash with error or connects to 127.0.0.1 am I doing something wrong ?
const IORedis = require('ioredis');
const queue = new Queue('myqueue', new IORedis(process.env.REDIS_URL));
const queueEvents = new QueueEvents('myqueueevents', new IORedis(process.env.REDIS_URL));
const worker = new Worker('myworker', async job => { ... }, new IORedis(process.env.REDIS_URL));
Issue Analytics
- State:
- Created 4 years ago
- Comments:21 (9 by maintainers)
Top Results From Across the Web
How To Connect to a Redis Database - DigitalOcean
If you have redis-server installed locally, you can connect to the Redis instance with the redis-cli command: redis-cli. This will take you into ......
Read more >Redis CLI
By default, redis-cli connects to the server at the address 127.0.0.1 with port 6379. You can change the port using several command line...
Read more >How to connect to remote Redis server? - Stack Overflow
Host, port, password and database By default redis-cli connects to the server at 127.0.0.1 port 6379. As you can guess, you can easily...
Read more >Redis - Commands - Tutorialspoint
To start Redis client, open the terminal and type the command redis-cli. This will connect to your local server and now you can...
Read more >Connect to a Redis instance - Memorystore - Google Cloud
Connecting to a Redis instance using the read endpoint · Install telnet using apt-get : sudo apt-get install telnet · From the terminal,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think the docs should mention that
QueueEvents
andWorker
does not reuse connections passed intoQueue
. So you need to pass the initialized connection to allQueueEvents
,Worker
andQueue
if you want to reuse it. This behavior is actually quite weird imho. Shouldn’tQueueEvents
andWorker
reuse the connection passed intoQueue
by default? New connections could be internally created but their configurations should be reused right?Is there any reason
connection
does not accept just a redis connection string without the need of importingioredis
?This seems very odd that you can pass in host / port but not only a string with full connection string…