فهرست منبع

配置最大连接数

locky 1 سال پیش
والد
کامیت
f61a7128af
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      Object/RedisObject.py

+ 1 - 1
Object/RedisObject.py

@@ -12,7 +12,7 @@ class RedisObject:
     def __init__(self, db=0):
         if CONFIG_INFO == CONFIG_US:
             from AnsjerPush.config import STARTUP_NODES, REDIS_PASSWORD
-            pool = ClusterConnectionPool(startup_nodes=STARTUP_NODES, password=REDIS_PASSWORD)
+            pool = ClusterConnectionPool(startup_nodes=STARTUP_NODES, password=REDIS_PASSWORD, max_connections=100)
             self.CONN = rediscluster.RedisCluster(connection_pool=pool)
         else:
             pool = redis.ConnectionPool(host=REDIS_ADDRESS, port=6379, db=db)