Browse Source

ttl设置

chenjunkai 6 years ago
parent
commit
0b69ca7b3c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Controller/DetectController.py

+ 2 - 1
Controller/DetectController.py

@@ -240,7 +240,8 @@ class NotificationView(View):
                     res_data = {'code': 0, 'msg': 'success,!'}
                     return JsonResponse(status=200, data=res_data)
                 else:
-                    redisObj.set_data(key=pkey, val=1, expire=ua['interval'])
+                    if ua['interval']:
+                        redisObj.set_data(key=pkey, val=1, expire=ua['interval'])
                 # ios apns
                 if push_type == 0:
                     self.do_apns(request_dict, ua, response)