|
@@ -230,10 +230,10 @@ class NotificationView(View):
|
|
|
try:
|
|
|
# 推送消息
|
|
|
if not have_dkey:
|
|
|
- # logger.info('准备推送:{}, {}'.format(uid, request_dict))
|
|
|
- # if (is_st == 1 or is_st == 3) and (push_type == 0 or push_type == 1):
|
|
|
- # push_thread = threading.Thread(target=self.push_thread_test, args=(push_type, aws_s3_client, uid, appBundleId, token_val, event_type, n_time, msg_title, msg_text, channel))
|
|
|
- # push_thread.start()
|
|
|
+ logger.info('准备推送:{}, {}'.format(uid, request_dict))
|
|
|
+ if (is_st == 1 or is_st == 3) and (push_type == 0 or push_type == 1):
|
|
|
+ push_thread = threading.Thread(target=self.push_thread_test, args=(push_type, aws_s3_client, uid, appBundleId, token_val, event_type, n_time, msg_title, msg_text, channel))
|
|
|
+ push_thread.start()
|
|
|
if push_type == 0: # ios apns
|
|
|
do_apns_code = self.do_apns(**kwag_args)
|
|
|
logger.info('进入do_apns,uid={}'.format(uid))
|
|
@@ -352,7 +352,7 @@ class NotificationView(View):
|
|
|
logger.info('推送图片测试:{} {} {} {} {} {} {} {}'.format(push_type, uid, appBundleId, token_val, event_type, n_time, msg_title, msg_text))
|
|
|
time.sleep(3)
|
|
|
bucket = 'foreignpush'
|
|
|
- thumbspng = '11PGLS16VTM7PZGP111A/1/1660166702.jpeg'
|
|
|
+ thumbspng = '11PGLS16VTM7PZGP111A/1/1661251934.jpeg'
|
|
|
try:
|
|
|
image_url = aws_s3_client.generate_presigned_url('get_object', Params={'Bucket': bucket, 'Key': thumbspng}, ExpiresIn=86400)
|
|
|
logger.info('推送图片url:{}'.format(image_url))
|