فهرست منبع

更新redis host为aws elasticache

lang 4 سال پیش
والد
کامیت
6e36775776
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 1 1
      Ansjer/us_config/config_formal.py
  2. 3 3
      Object/RedisObject.py

+ 1 - 1
Ansjer/us_config/config_formal.py

@@ -17,7 +17,7 @@ NGINX_RTMP_STAT = 'http://www.dvema.com/stat'
 SERVER_DOMAIN_SSL = 'https://www.dvema.com/'
 SERVER_DOMAIN = 'http://www.dvema.com/'
 DOMAIN_HOST = 'www.dvema.com'
-SERVER_HOST = 'localhost'
+SERVER_HOST = 'backendserver.5tgle2.0001.usw1.cache.amazonaws.com'
 # PAYPAL_CRD = {
 #     "mode": "live",  # sandbox or live
 #     "client_id": "AdSRd6WBn-qLl9OiQHQuNYTDFSx0ZX0RUttqa58au8bPzoGYQUrt8bc6591RmH8_pEAIPijdvVYSVXyI",

+ 3 - 3
Object/RedisObject.py

@@ -26,9 +26,9 @@ db=3  -> 统计在线人数用
 class RedisObject:
 
     def __init__(self, db=0,SERVER_HOST = SERVER_HOST):
-        if db == 3:
-            if SERVER_TYPE != 'Ansjer.formal_settings':
-                db = 4
+        # if db == 3:
+        #     if SERVER_TYPE != 'Ansjer.formal_settings':
+        #         db = 4
         self.POOL = redis.ConnectionPool(host=SERVER_HOST, port=6379, db=db)
         self.CONN = redis.Redis(connection_pool=self.POOL)