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
Feature: Direct support for full redis URLs #1039
Comments
After examining this feature more deeply we have realized that the kind of code changes required do not really motivate the change. In order to keep the API clean, we have decided to not support this feature. Instead, it is recommended to just create the redis instance first and pass it as a parameter: import * as Redis from 'ioredis';
const connection = new Redis('redis:/qweqeqwe');
const queue = new Queue('test', { connection }); |
Passing the connection does not work anymore?
Cannot pass the connection to Queue or Worker as shown in the docs.
Typescript is complaining about the { connection } object, and building would throw this:
|
@highri5e I wonder if that is the correct code considering you misspelled connection (conection) |
Sorry. The code was copied from your comment, which had the misspell in it. This is my code:
I tried different options. I have to use the url rather than host, port combo because we're using Heroku and that's what's available. Locally I was not using the redis connection, I was passing connection options with url. While the connection options object was not correct, everything was working because Bull was using the default redis connection. |
I do not see anything obviously wrong, but here we have some tests that you can use as a starting point to find the issue: https://github.com/taskforcesh/bullmq/blob/master/tests/test_worker.ts#L119 |
As discussed, a follow-up task for the question raised here:
Originally posted by @dan003400 in #53 (comment)
Thanks for your consideration!
The text was updated successfully, but these errors were encountered: