소스 검색

缓存APP消息推送参数

zhangdongming 1 년 전
부모
커밋
3bff8e77b8
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      Service/DevicePushService.py

+ 5 - 0
Service/DevicePushService.py

@@ -160,6 +160,11 @@ class DevicePushService:
         redis_obj = RedisObject(3)
         # 推送
         if is_app_push:
+            msg_key = 'PUSH:MSG:IMAGE:{}:{}:{}'.format(params['uid'], params['channel'], params['n_time'])
+            d_params = {'is_st': params['is_st'], 'storage_location': params['storage_location'],
+                        'event_tag': params['event_tag'], 'event_type': params['event_type']}
+            redis_obj.set_data(msg_key, json.dumps(d_params), 60)
+
             push_kwargs = params['push_kwargs']
             for up in params['uid_set_push_list']:
                 push_type = up['push_type']