Update app.py
Browse files
app.py
CHANGED
@@ -9,9 +9,9 @@ eventlet.monkey_patch()
|
|
9 |
# Redis Sentinel Setup
|
10 |
SENTINELS = [('sentinel1', 26379), ('sentinel2', 26379), ('sentinel3', 26379)]
|
11 |
MASTER_NAME = 'mymaster'
|
12 |
-
PASSWORD = 'yourpassword'
|
13 |
|
14 |
-
|
|
|
15 |
redis_master = sentinel.master_for(MASTER_NAME, socket_timeout=0.1, decode_responses=True)
|
16 |
redis_slave = sentinel.slave_for(MASTER_NAME, socket_timeout=0.1, decode_responses=True)
|
17 |
|
|
|
9 |
# Redis Sentinel Setup
|
10 |
SENTINELS = [('sentinel1', 26379), ('sentinel2', 26379), ('sentinel3', 26379)]
|
11 |
MASTER_NAME = 'mymaster'
|
|
|
12 |
|
13 |
+
|
14 |
+
sentinel = Sentinel(SENTINELS, socket_timeout=0.1)
|
15 |
redis_master = sentinel.master_for(MASTER_NAME, socket_timeout=0.1, decode_responses=True)
|
16 |
redis_slave = sentinel.slave_for(MASTER_NAME, socket_timeout=0.1, decode_responses=True)
|
17 |
|