Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing redisConfig parameter #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bruno-bert
Copy link

O redisConfig não consegue entender o host e a porta configuradas, da forma que está passando no construtor. No seu código funcionou, pois o redis estava no docker e mapeou pro 127.0.0.1, e então, ele entendeu o host padrão. Peguei esse erro quando tentei fazer um container ler o redis de outro container, e neste caso, meu host do redis se chamava "redis". Pra arrumar, deve passar a url da conexão, dessa forma:

de:
const mailQueue = new Queue(RegistrationMail.key, redisConfig)

para:
const mailQueue = new Queue(RegistrationMail.key, redis://${redisConfig.host}:${redisConfig.port})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants