-
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
Queue cannot be created with redis config as string #2118
Comments
This was actually an undocumented feature that should not be possible in the first place, please see this: #2116 |
Not only external libraries can be a problem but how do you suppose to split url provisioned to environment to host, port, password, username? |
@eliotik you just pass the "host" option like you do in ioredis: https://github.com/luin/ioredis/blob/master/API.md#new-redisport-host-options |
@eliotik or well, maybe I do not understand what you mean... you can either pass the url as a string and/or you pass an options object with whatever options you need. What you cannot do is passing a string with options attached to it, which imho seems like an antipattern to me. |
not exactly. |
@eliotik I think you are misunderstanding the issue. You can still do: |
Bull no longer allows passing the URL directly as the value of `options.redis`. Instead, pass URL as a separate argument when present. See OptimalBits/bull#2118 for additional context.
Bull no longer allows passing the URL directly as the value of `options.redis`. Instead, pass URL as a separate argument when present. See OptimalBits/bull#2118 for additional context.
Bull no longer allows passing the URL directly as the value of `options.redis`. Instead, pass URL as a separate argument when present. See OptimalBits/bull#2118 for additional context.
### [3.29.3](v3.29.2...v3.29.3) (2021-09-08) ### Bug Fixes * 🐛 Update how Redis URL is passed to Bull ([81bf488](81bf488)), closes [OptimalBits/bull#2118](OptimalBits/bull#2118)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description
Queue object cannot be created with
options.redis
as string any more. Which has been possible in version3.23.0
Minimal, Working Test code to reproduce the issue.
The change causing the change of behavior lays here:
v3.23.3...v3.25.0 in
Queue.js
line 280The
@types/bull
library declaresredis
property as:Redis.RedisOptions | string | undefined;
but theQueue.js:280
by using_.assign(...)
breaks the string into an object. The difference between both versions (3.23.0 - 3.25.0) looks then like this:Bull version
3.23.0 vs 3.25.0
Additional information
The text was updated successfully, but these errors were encountered: