flyerhzm / redis-sentinel

another redis automatic master/slave failover solution for ruby by using built-in redis sentinel (deprecated)
MIT License
188 stars 67 forks source link

Parse uri string in sentinels array #32

Closed matkam closed 10 years ago

matkam commented 10 years ago

This is a workaround to allow use with Rails.cache to resolve issue #30. Allows using a uri for sentinels instead of a hash like so:

Rails.config.cache_store = :redis_store, { master_name: 'master', sentinels: ['sentinel://localhost:26379'] }

Note: reopening the last pull request #31. I had closed it because of a problem, but it turned out to just be my sentinel config.

flyerhzm commented 10 years ago

@matkam could you add tests to cover your change?

matkam commented 10 years ago

@flyerhzm is there anything else you'd like me to add for this change?

flyerhzm commented 10 years ago

@matkam it's good, thanks