-
Notifications
You must be signed in to change notification settings - Fork 325
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
Add database & password parameters support for predis sentinel #340
Conversation
It would be nice to also update the documentation in Resources/doc/index.md to reflect that these options have been added. |
I already add it doc_update |
After sentinel return connection to master/slave there is no option to wrap |
Sorry, didn't see that. Nice job. |
Any chance for merge anytime soon? |
Resources/doc/index.md
Outdated
``` | ||
|
||
The `service` is the name of the set of Redis instances. | ||
The `parameters` is optional parameters that added to master/slave connections and ignores by sentinel connections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please change this to:
The optional parameters
option can be used to set parameters like the database number and password for the master/slave connections, they don't apply for the connection to sentinal.
(if it sounds correct to you, I don't have sentinal experience)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improved
Thanks, merged. |
If you use Sentinel you could not set db id in dsn like this
redis://%redis_host%:%redis_port%/1
you will have an exception:cause this dsn is connection for sentinel hosts and it have no idea about database number.
For this reason predis add additional
parameters
to connection optionsin this issue predis/predis#131 (comment)
by this commit predis/predis@a816adf
After a day of debugging this bundle and predis i found this magic method
setDefaultParameters
and it's work like a charm for me.i think it will be relative for
#274
#315
#339
#336