Explorar el Código

设置过期时间

peng hace 2 años
padre
commit
4014ee7d58
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      background/views.py

+ 1 - 1
background/views.py

@@ -188,7 +188,7 @@ class WechatLoginView(APIView):
         if data.get('errcode') == 0:
             access_token = data['access_token']
             expires_in = data['expires_in']
-            redis_client.set_data('enterprise_wechat_access_token', access_token, expires_in)
+            redis_client.set_ex_data('enterprise_wechat_access_token', access_token, expires_in)
             return access_token
         else:
             return False