renyupeng %!s(int64=2) %!d(string=hai) anos
pai
achega
41b1a452ac
Modificáronse 2 ficheiros con 5 adicións e 5 borrados
  1. 1 1
      utils/PromoterInfoWebHook.py
  2. 4 4
      utils/mysql_utils.py

+ 1 - 1
utils/PromoterInfoWebHook.py

@@ -31,7 +31,7 @@ def api_root():
 def webhook_get_promoter():
     rep = json.loads(request.data)
     promoterId = rep["promoterId"]
-    sql = "select cookie from ruixuan.kuaishou_supply_chain_cookie"
+    sql = "select cookie from kwai_promoter.kuaishou_supply_chain_cookie"
     cookie = MysqlUtils().QueryOne(sql)[0]
     rollback = ReturnPromoterInfoSpider().PromoterInfoSpiderHandler(promoterId, cookie)
     p1 = Process(target=PromoterInfoSpider().PromoterInfoSpiderHandler, args=(promoterId, cookie))

+ 4 - 4
utils/mysql_utils.py

@@ -24,10 +24,10 @@ class MysqlUtils(object):
     def __init__(self):
 
         config = dict(
-            host=ConfConstant.TIDB_PRO_HOST,
-            user=ConfConstant.TIDB_PRO_USER,
-            password=ConfConstant.TIDB_PRO_PASSWORD,
-            port=ConfConstant.TIDB_PRO_PORT,
+            host=ConfConstant.TIDB_HOST,
+            user=ConfConstant.TIDB_USER,
+            password=ConfConstant.TIDB_PASSWORD,
+            port=ConfConstant.TIDB_PORT,
             charset='utf8mb4',  # 编码要加上,否则可能出现中文乱码问题
             use_unicode=False,
         )