From 28fa6edb9816a3ac0b3942827a3856d57ae1bd60 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Thu, 13 Apr 2017 17:25:55 -0700 Subject: [PATCH] Moving to production APNS. --- apps/notifications/models.py | 6 +++--- settings.py | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/notifications/models.py b/apps/notifications/models.py index 150a2c2ba..275fd8bd0 100644 --- a/apps/notifications/models.py +++ b/apps/notifications/models.py @@ -225,9 +225,9 @@ class MUserFeedNotification(mongo.Document): def send_ios(self, story, user, usersub): if not self.is_ios: return - apns = APNs(use_sandbox=True, - cert_file='/srv/newsblur/config/certificates/aps_development.pem', - key_file='/srv/newsblur/config/certificates/aps_development.pem', + apns = APNs(use_sandbox=False, + cert_file='/srv/newsblur/config/certificates/aps.pem', + key_file='/srv/newsblur/config/certificates/aps.pem', enhanced=settings.DEBUG) tokens = MUserNotificationTokens.get_tokens_for_user(self.user_id) diff --git a/settings.py b/settings.py index 4c8f18c5b..7bf2c9dd6 100644 --- a/settings.py +++ b/settings.py @@ -158,6 +158,11 @@ LOGGING = { 'class': 'logging.StreamHandler', 'formatter': 'verbose' }, + 'vendor.apns':{ + 'level': 'DEBUG', + 'class': 'logging.StreamHandler', + 'formatter': 'verbose' + }, 'log_file':{ 'level': 'DEBUG', 'class': 'logging.handlers.RotatingFileHandler',