Эх сурвалжийг харах

列表转换,极光推送打印

locky 5 сар өмнө
parent
commit
04456cfa80

+ 1 - 0
Service/DevicePushService.py

@@ -464,6 +464,7 @@ class DevicePushService:
                         uid = kwargs.pop('uid')
                         redis_obj = RedisObject()
                         jpush_uid_list = redis_obj.lrange(JPUSH_UID_LIST, 0, -1)
+                        jpush_uid_list = [str(i, 'utf-8') for i in jpush_uid_list]
                         if uid in jpush_uid_list:
                             push_result = PushObject.jpush(**kwargs)
                 elif push_type == 3:

+ 1 - 0
Service/PushService.py

@@ -310,6 +310,7 @@ class PushObject:
             push.platform = jpush.all_
             res = push.send()
             assert res.status_code == 200
+            LOGGER.info('极光推送响应:{}, 参数:{}, 令牌:{}'.format(res, push_data, token_val))
             return True
         except Exception as e:
             LOGGER.info('极光推送异常:{}'.format(repr(e)))