celery trying again 怼烎@ 2021-06-24 15:56 289阅读 0赞 response = push.send() Request failed with status 400: '1011 {'code': 1011, 'message': 'cannot find user by this audience'}': "cannot find user by this audience" import jpush _jpush = jpush.JPush('38445dcca2aaf44a9ce7bd4b', '0477f04bbfd8d97c04a9208c') # dev _jpush = jpush.JPush('fd2370dacc7c25531ed9c55a', '66c6f36049b92664c65520e6') # pro push = _jpush.create_push() alias_list = ['39576fb3d5ed72ffb370f521ca93e890'] push.audience = jpush.audience(jpush.alias(*alias_list)) alert = 'test001' data = { "uri": "", "page": 13, "params": { "duration": 5, "text": { "desc": "这就是一条描述", "title": "标题", "coupons": { "expireAt": "2018-05-29", "status": 0, "ccontrolNo": "F849BF801FD8", "couponType": 1, "price": 0, "redeemCode": "397301100098", "id": 84, "name": "名字", "description": "另一个描述 description", "detail": "详情1,2,3,4"} }, "record_id": 438909}, "redbadge": { "100": 1}} sound = 'default' ios_production = True push.notification = jpush.notification( alert=alert, ios={ "extras": { "data": data}, "sound": sound, "content-available": True,}) push.options = { "apns_production": ios_production} push.platform = jpush.all_ response = push.send() print('response: %s' % response.payload) 583b98f9b9d7fb0ec1e65f54:39576fb3d5ed72ffb370f521ca93e890 测试 Sroadcast.send_msg_to_user('586b87213a09807014c1ac83', message='test') celery worker -A -l info --beat celery.worker.consumer consumer: Cannot connect to redis://10.44.34.124:16379/6: . Trying again in 32.00 seconds... 日志等级 [http://www.jianshu.com/p/9e422d9f1ce2][http_www.jianshu.com_p_9e422d9f1ce2] [http_www.jianshu.com_p_9e422d9f1ce2]: http://www.jianshu.com/p/9e422d9f1ce2
还没有评论,来说两句吧...