Ver Fonte

修改redis key

locky há 2 anos atrás
pai
commit
7bd4084a90
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      Service/PushService.py

+ 3 - 2
Service/PushService.py

@@ -141,9 +141,10 @@ class PushObject:
 
             # 限制每小时发送一次
             redis_obj = RedisObject()
-            time_limit = redis_obj.get_data('ios_push_error_mail')
+            key = 'ios_push_error_mail_{}'.format(app_bundle_id)
+            time_limit = redis_obj.get_data(key)
             if not time_limit:
-                redis_obj.set_data('ios_push_error_mail', 1, 60 * 60)
+                redis_obj.set_data(key, 1, 60 * 60)
                 email_content = '{}服IOS推送异常: {}, 证书路径: {}'.format(CONFIG_INFO, repr(e), pem_path)
                 S3Email().send_email(email_content, 'servers@ansjer.com')