Browse Source

删除IOS推送异常邮件发送

locky 2 năm trước cách đây
mục cha
commit
4fea63f15d
1 tập tin đã thay đổi với 0 bổ sung11 xóa
  1. 0 11
      Service/PushService.py

+ 0 - 11
Service/PushService.py

@@ -134,20 +134,9 @@ class PushObject:
             res = cli.push(n=n, device_token=token_val, topic=app_bundle_id)
             LOGGER.info('IOS推送响应状态码{},params,uid:{},{}'.format(res.status_code, uid, json.dumps(push_data)))
             assert res.status_code == 200
-        except (AssertionError, ConnectionResetError) as e:
-            LOGGER.info('IOS推送异常: {}, 证书路径: {}'.format(repr(e), pem_path))
         except Exception as e:
             LOGGER.info('IOS推送异常: {}, 证书路径: {}'.format(repr(e), pem_path))
 
-            # 限制每种app包每天发送一次
-            redis_obj = RedisObject()
-            key = 'ios_push_error_mail_{}'.format(app_bundle_id)
-            is_lock = redis_obj.CONN.setnx(key, 1)
-            redis_obj.CONN.expire(key, 60*60*24)
-            if not is_lock:
-                email_content = '{}服IOS推送异常: {}, 证书路径: {}'.format(CONFIG_INFO, repr(e), pem_path)
-                S3Email().send_email(email_content, 'servers@ansjer.com')
-
     @staticmethod
     def android_fcm_push(nickname, app_bundle_id, token_val, n_time, event_type, msg_title, msg_text,
                          uid='', channel='1', image=''):