-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redis: Initial support for Redis Sentinel
This adds basic support for using Redis Sentinel to mediate connections to the primary Redis server used by the API functionality. Setting `REDIS_SENTINEL_HOSTS` to a dict of "'host': port" key/values will override any settings for `REDIS_DB_HOST` and `REDIS_DB_PORT` with values provided by Sentinel. Note that for the purposes of running tests, this will circumvent the patching of `api_keys.utils.redis.StrictRedis` by mockredis as calls to `redis_connection()` will use `sentinel.master_for` rather than `redis.StrictRedis`, so you'll need functioning Redis and Sentinel services in this case. Set `REDIS_SENTINEL_HOSTS` to `null` to fall-back to the existing mocked connection. Fixes #132
- Loading branch information
Showing
3 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters