Merge pull request #2871 from alphagov/utils-bump

bump utils to fix statsd timing bug
This commit is contained in:
Leo Hemsted
2020-06-11 15:13:04 +01:00
committed by GitHub
3 changed files with 6 additions and 6 deletions

View File

@@ -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):

View File

@@ -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

View File

@@ -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