-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
options.redis.opts.createClient
no longer works?
#711
Comments
For anyone who stumbles on this, apparently const client = new Redis(REDIS_URL)
const subscriber = new Redis(REDIS_URL)
function createQueue(name) {
const queue = new Queue(name, {
createClient(type) {
switch (type) {
case 'client': return client
case 'subscriber': return subscriber
default: return new Redis(REDIS_URL)
}
}
})
} |
For what it's worth ... you could update the documentation and submit a PR. I'm sure contributions like that are quite welcomed. Was also mentioned in #545 |
I have updated it now. |
@manast thank you! I think in the future, the most helpful thing for me as a consumer of this library would be if the @ritter thanks, I definitely realize that—here's a past PR I made to the docs. In this case though I think it's pretty hard to ask people to contribute docs for undocumented breaking API changes they don't even know about when they go to upgrade. |
I've been trying to track down tests failing in super weird ways for many hours now, and it seems like in
3.x
theoptions.redis.opts.createClient
function is no longer called? I used to have it setup like this:Which is still how it's recommended in the
PATTERNS.md
document. And theMIGRATION.md
document doesn't really mention what has changed.Is there another way to do this now that's not documented?
The text was updated successfully, but these errors were encountered: