Closed PandasProperty closed 1 year ago
I've replaced my redis
with ioredis
...
const redisClient = new Redis({
host: 'redis-something.cloud.redislabs.com',
username: 'XXX',
password: 'XXX',
port: XXX,
})
...
const options = {
host: 'YYYY'
username: 'XXX',
password: 'XXX',
port: YYYY,
retryStrategy: (times: number) => {
return Math.min(times * 50, 2000);
}
}
...
redisClient.on('connect', () => {
console.log('Redis client connected successfully') // this is logged
PublicationSubscription = new RedisPubSub({
connection: options,
publisher: new Redis(options),
subscriber: new Redis(options)
})
})
the same. my redisClient
gets connected to the right instance and the RedisPubSub
searches for localhost
Please help :(
my mistake, I had a new RedisPubSub()
in other side of the code (I wrote it when doing a dummy example to see that it works and forgot about it). sorry and thank you
When running manually with npm start it connects ok to the remote redis. But inside docker it searches for localhost:
I have the following code: