|
@@ -123,7 +123,8 @@ class NotificationV2View(View):
|
|
|
'electricity': electricity, 'bucket': bucket, 'aws_s3_client': aws_s3_client,
|
|
|
'app_push': cache_app_push, 'storage_location': 2, 'ai_type': ai_type, 'device_type': device_type,
|
|
|
'dealings_type': dealings_type, 'detection': detection,
|
|
|
- 'app_push_config': uid_set_push_list[0]['uid_set__msg_notify']}
|
|
|
+ 'app_push_config': uid_set_push_list[0]['uid_set__msg_notify'],
|
|
|
+ 'uid_set_push_list': uid_set_push_list}
|
|
|
|
|
|
# 推送消息,生成推送数据列表
|
|
|
result = DevicePushService.save_msg_push(uid_set_push_list, **params)
|
|
@@ -172,21 +173,21 @@ class NotificationV2View(View):
|
|
|
|
|
|
|
|
|
def push_and_save_data(**params):
|
|
|
- TIME_LOGGER.info('触发异步推送函数')
|
|
|
+ TIME_LOGGER.info('触发异步推送函数:{}'.format(params))
|
|
|
TIME_LOGGER.info('{}开始异步推送'.format(params['uid']))
|
|
|
# 推送消息,生成推送数据列表
|
|
|
- # result = DevicePushService.save_msg_push(uid_set_push_list, **params)
|
|
|
- # # 保存推送数据
|
|
|
- # TIME_LOGGER.info('{}开始异步存表'.format(params['uid']))
|
|
|
- # save_success = DevicePushService.save_sys_msg(
|
|
|
- # is_sys_msg,
|
|
|
- # result['local_date_time'],
|
|
|
- # result['sys_msg_list'],
|
|
|
- # result['new_device_info_list'])
|
|
|
- # if save_success:
|
|
|
- # TIME_LOGGER.info('{}异步存表成功'.format(params['uid']))
|
|
|
- # else:
|
|
|
- # TIME_LOGGER.info('{}异步存表失败'.format(params['uid']))
|
|
|
+ result = DevicePushService.save_msg_push(params['uid_set_push_list'], **params)
|
|
|
+ # 保存推送数据
|
|
|
+ TIME_LOGGER.info('{}开始异步存表'.format(params['uid']))
|
|
|
+ save_success = DevicePushService.save_sys_msg(
|
|
|
+ params['is_sys_msg'],
|
|
|
+ result['local_date_time'],
|
|
|
+ result['sys_msg_list'],
|
|
|
+ result['new_device_info_list'])
|
|
|
+ if save_success:
|
|
|
+ TIME_LOGGER.info('{}异步存表成功'.format(params['uid']))
|
|
|
+ else:
|
|
|
+ TIME_LOGGER.info('{}异步存表失败'.format(params['uid']))
|
|
|
|
|
|
|
|
|
def test_func(a, b, **kwargs):
|