Tidied up pull request comments

This commit is contained in:
Martyn Inglis
2016-09-23 15:59:23 +01:00
parent 124487f204
commit 6f7dd149e2
4 changed files with 10 additions and 14 deletions

View File

@@ -75,12 +75,12 @@ class FiretextClient(SmsClient):
response.status_code
)
if not success:
self.statsd_client.incr("clients.firetext.error")
self.current_app.logger.error(log_message)
else:
if success:
self.current_app.logger.info(log_message)
self.statsd_client.incr("clients.firetext.success")
else:
self.statsd_client.incr("clients.firetext.error")
self.current_app.logger.error(log_message)
def send_sms(self, to, content, reference, sender=None):

View File

@@ -75,12 +75,12 @@ class MMGClient(SmsClient):
response.status_code
)
if not success:
self.statsd_client.incr("clients.mmg.error")
self.current_app.logger.error(log_message)
else:
if success:
self.current_app.logger.info(log_message)
self.statsd_client.incr("clients.mmg.success")
else:
self.statsd_client.incr("clients.mmg.error")
self.current_app.logger.error(log_message)
def get_name(self):
return self.name

View File

@@ -8,10 +8,7 @@ from notifications_utils.template import Template, get_sms_fragment_count
from notifications_utils.renderers import HTMLEmail, PlainTextEmail, SMSMessage
from app import clients, statsd_client, create_uuid
from app.dao.notifications_dao import (
get_notification_by_id,
dao_update_notification
)
from app.dao.notifications_dao import dao_update_notification
from app.dao.provider_details_dao import get_provider_details_by_notification_type
from app.dao.services_dao import dao_fetch_service_by_id
from app.celery.research_mode_tasks import send_sms_response, send_email_response