mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Merge branch '2.3.x'
This commit is contained in:
@@ -36,7 +36,9 @@ def get_redis_client():
|
||||
return aioredis.from_url(
|
||||
settings.REDIS_URL, encoding="utf-8", decode_responses=True
|
||||
)
|
||||
sentinel = aioredis.sentinel.Sentinel(settings.REDIS_SENTINELS, socket_timeout=0.1)
|
||||
sentinel = aioredis.sentinel.Sentinel(
|
||||
settings.REDIS_SENTINELS, socket_timeout=0.1, db=settings.REDIS_QUOTA_DB
|
||||
)
|
||||
return sentinel.master_for(settings.REDIS_MASTER, socket_timeout=0.1)
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,9 @@ def get_redis_connection():
|
||||
db=settings.REDIS_QUOTA_DB,
|
||||
)
|
||||
else:
|
||||
sentinel = redis.sentinel.Sentinel(settings.REDIS_SENTINELS, socket_timeout=0.1)
|
||||
sentinel = redis.sentinel.Sentinel(
|
||||
settings.REDIS_SENTINELS, socket_timeout=0.1, db=settings.REDIS_QUOTA_DB
|
||||
)
|
||||
rclient = sentinel.master_for(settings.REDIS_MASTER, socket_timeout=0.1)
|
||||
rclient.set_response_callback("HGET", int)
|
||||
return rclient
|
||||
|
||||
Reference in New Issue
Block a user