authen %!s(int64=2) %!d(string=hai) anos
pai
achega
a26997db4c
Modificáronse 3 ficheiros con 4 adicións e 4 borrados
  1. 1 1
      authen/werobot/client.py
  2. 2 2
      authen/werobot/robot.py
  3. 1 1
      setup.py

+ 1 - 1
authen/werobot/client.py

@@ -130,7 +130,7 @@ class Client(object):
 
         :return: 返回token
         """
-        key = "trops:wxmp:gzh:access_token"
+        key = "access_token:%s" % self.appid
         if self.redis_store:
             self._token = self.redis_store.get(key)
             # return self._token

+ 2 - 2
authen/werobot/robot.py

@@ -662,12 +662,12 @@ class WeRoBot(BaseRoBot):
         app_id = app.config.get("WXMP_APP_ID")
         app_secret = app.config.get("WXMP_APP_SECRET")
         encoding_aes_key = app.config.get("WXMP_APP_AESKEY")
-        access_token_redis_url = app.config.get("ACCESS_TOKEN_REDIS_URL")
+        WXMP_REDIS_URL = app.config.get("WXMP_REDIS_URL")
         self.config.update(
             TOKEN=token,
             APP_ID=app_id,
             APP_SECRET=app_secret,
-            ACCESS_TOKEN_REDIS_URL=access_token_redis_url,
+            WXMP_REDIS_URL=WXMP_REDIS_URL,
             ENCODING_AES_KEY=encoding_aes_key)
 
 

+ 1 - 1
setup.py

@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
 
 setup(
     name='authen.werobot',
-    version=0.15,
+    version=0.16,
     url='http://git.trops-global.com/authen/wxmp_utils.git',
     license='GPL',
     author='authen',