-
Notifications
You must be signed in to change notification settings - Fork 15
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
Redis port and password aren't supported #3
Comments
ActiveJob::Locking.options.hosts = ['localhost'] In the suo adapter, the code is:
Notice it takes the first host specified in options. So configure that value based on the suo documentation. |
@cfis Thanks, but I don't think you read my post. I'm trying to specify ports and passwords, and/or entire connection strings. |
Depending on the adapter, I think you can use the host string to specify the port and/or password. |
In this case, to set the full connection string, you'd need to drop the host hash. So:
Basically, with the current implementation, it is impossible to specify ports or passwords using the Suo adapter. The Maybe it needs to do something like IMO, you should get rid of |
Makes sense. Happy with your idea, can you code it up? |
Hi there. I'm using the suo adapter on my project and I had to hack activejob-locking to pass through a port and password for the redis server to the underlying suo gem. I'd submit a pull request, but the activejob-locking gem's current methodology for distributed servers is kind of counter-intuitive for the redis case. The suo adapter, for example, just uses
{ host: options.hosts.first }
and drops any other hosts in the array. Would I ideally pass in an array of ports and passwords which would each get truncated to the first element?In any case, supporting ports and passwords, or entire connection strings, seems like a pretty basic feature, which I would like to see supported at some point.
Cheers. :)
The text was updated successfully, but these errors were encountered: