|
@@ -379,7 +379,7 @@ class DevicePushService:
|
|
|
push_type = kwargs['push_type']
|
|
|
push_kwargs = kwargs['push_kwargs']
|
|
|
push_result = False
|
|
|
-
|
|
|
+ uid = kwargs['uid']
|
|
|
# is_st为1或3,且推送类型为apns,gcm,华为,异步推送图片
|
|
|
if (kwargs['is_st'] == 1 or kwargs['is_st'] == 3) and \
|
|
|
(push_type == 0 or push_type == 1 or push_type == 3):
|
|
@@ -440,10 +440,10 @@ class DevicePushService:
|
|
|
elif push_type == 8: # android honorpush
|
|
|
push_result = PushObject.android_honorpush(**push_kwargs)
|
|
|
|
|
|
- if kwargs['event_type'] in [606, 607]:
|
|
|
- # 写入日志表
|
|
|
- PushLog.objects.create(event_type=kwargs['event_type'], created_time=int(time.time()),
|
|
|
- content=push_kwargs, push_result=push_result)
|
|
|
+ if kwargs['event_type'] in [606, 607]:
|
|
|
+ # 写入日志表
|
|
|
+ PushLog.objects.create(uid=uid, event_type=kwargs['event_type'], created_time=int(time.time()),
|
|
|
+ content=push_kwargs, push_result=push_result)
|
|
|
return push_result
|
|
|
except Exception as e:
|
|
|
LOGGING.error('发送推送异常,error_line:{},error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|