lang 3 年之前
父節點
當前提交
9fe00f0ac6
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      Controller/DetectController.py

+ 7 - 3
Controller/DetectController.py

@@ -430,9 +430,13 @@ class NotificationView(View):
                                 extras=push_data)
         push.notification = jpush.notification(android=android)
         push.platform = jpush.all_
-        res = push.send()
-        print(res)
-        return res.status_code
+        try:
+            res = push.send()
+            print(res)
+            status_code = res.status_code
+        except:
+            status_code = 100
+        return status_code
         # try:
         #     res = push.send()
         #     print(res)