Browse Source

修改推送日志

lang 3 years ago
parent
commit
cd21329173
1 changed files with 5 additions and 2 deletions
  1. 5 2
      Controller/AiController.py

+ 5 - 2
Controller/AiController.py

@@ -468,8 +468,11 @@ class AiView(View):
         apns_push_time = int(apns_push_time)
         apns_push_time = int(apns_push_time)
         logger.info("---msg--id={msg_id}".format(msg_id=msg_id))
         logger.info("---msg--id={msg_id}".format(msg_id=msg_id))
         logger.info("---apns----push_time={apns_push_time}".format(apns_push_time=apns_push_time))
         logger.info("---apns----push_time={apns_push_time}".format(apns_push_time=apns_push_time))
-
-        AiProcessTime.objects.filter(msg_id=msg_id).update(appPushTime=apns_push_time)
+        try:
+            AiProcessTime.objects.filter(msg_id=msg_id).update(appPushTime=apns_push_time)
+        except Exception as e:
+            logger.info(repr(e))
+            return response.json(902,repr(e))
         return response.json(0)
         return response.json(0)
 
 
     def do_ai_identification(self, request_dict,response):
     def do_ai_identification(self, request_dict,response):