diff --git a/app/delivery/send_to_providers.py b/app/delivery/send_to_providers.py index 883eb866a..c50858ccb 100644 --- a/app/delivery/send_to_providers.py +++ b/app/delivery/send_to_providers.py @@ -72,8 +72,8 @@ def send_sms_to_provider(notification): notification.billable_units = template.fragment_count update_notification_to_sending(notification, provider) - delta_milliseconds = (datetime.utcnow() - notification.created_at).total_seconds() * 1000 - statsd_client.timing("sms.total-time", delta_milliseconds) + delta_seconds = (datetime.utcnow() - notification.created_at).total_seconds() + statsd_client.timing("sms.total-time", delta_seconds) def send_email_to_provider(notification): @@ -118,8 +118,8 @@ def send_email_to_provider(notification): notification.reference = reference update_notification_to_sending(notification, provider) - delta_milliseconds = (datetime.utcnow() - notification.created_at).total_seconds() * 1000 - statsd_client.timing("email.total-time", delta_milliseconds) + delta_seconds = (datetime.utcnow() - notification.created_at).total_seconds() + statsd_client.timing("email.total-time", delta_seconds) def update_notification_to_sending(notification, provider): diff --git a/requirements-app.txt b/requirements-app.txt index 91658d72c..7b693e54f 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -26,6 +26,6 @@ notifications-python-client==5.5.1 # PaaS awscli-cwlogs>=1.4,<1.5 -git+https://github.com/alphagov/notifications-utils.git@39.4.3#egg=notifications-utils==39.4.3 +git+https://github.com/alphagov/notifications-utils.git@39.4.4#egg=notifications-utils==39.4.4 gds-metrics==0.2.0 diff --git a/requirements.txt b/requirements.txt index 99cbb730c..330b5f583 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,7 +28,7 @@ notifications-python-client==5.5.1 # PaaS awscli-cwlogs>=1.4,<1.5 -git+https://github.com/alphagov/notifications-utils.git@39.4.3#egg=notifications-utils==39.4.3 +git+https://github.com/alphagov/notifications-utils.git@39.4.4#egg=notifications-utils==39.4.4 gds-metrics==0.2.0