|
@@ -62,6 +62,7 @@ class InitView(View):
|
|
|
def check_apns_pem():
|
|
|
response = ResponseObject()
|
|
|
try:
|
|
|
+ server_id = os.environ.get('ServerID', 0)
|
|
|
n_time = int(time.time())
|
|
|
uid, msg_title, msg_text, launch_image, event_type, channel, nickname, token_val = \
|
|
|
'', '', '', '', 1, '', '', ''
|
|
@@ -87,7 +88,7 @@ class InitView(View):
|
|
|
try:
|
|
|
res = cli.push(n=n, device_token=token_val, topic=app_bundle_id)
|
|
|
except SSLError as e:
|
|
|
- email_content = '{}服苹果推送证书过期: {}'.format(CONFIG_INFO, pem_path)
|
|
|
+ email_content = '{}服第{}台服务器苹果推送证书过期: {}'.format(CONFIG_INFO, server_id, pem_path)
|
|
|
S3Email().faEmail(email_content, 'servers@ansjer.com')
|
|
|
return response.json(0)
|
|
|
except Exception as e:
|