bump utils to fix statsd timing bug

statsd timing should always be in seconds, not milliseconds
This commit is contained in:
Leo Hemsted
2020-06-11 15:01:15 +01:00
parent 4d2396699a
commit bd433ad24f
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 notification.billable_units = template.fragment_count
update_notification_to_sending(notification, provider) update_notification_to_sending(notification, provider)
delta_milliseconds = (datetime.utcnow() - notification.created_at).total_seconds() * 1000 delta_seconds = (datetime.utcnow() - notification.created_at).total_seconds()
statsd_client.timing("sms.total-time", delta_milliseconds) statsd_client.timing("sms.total-time", delta_seconds)
def send_email_to_provider(notification): def send_email_to_provider(notification):
@@ -118,8 +118,8 @@ def send_email_to_provider(notification):
notification.reference = reference notification.reference = reference
update_notification_to_sending(notification, provider) update_notification_to_sending(notification, provider)
delta_milliseconds = (datetime.utcnow() - notification.created_at).total_seconds() * 1000 delta_seconds = (datetime.utcnow() - notification.created_at).total_seconds()
statsd_client.timing("email.total-time", delta_milliseconds) statsd_client.timing("email.total-time", delta_seconds)
def update_notification_to_sending(notification, provider): def update_notification_to_sending(notification, provider):

View File

@@ -26,6 +26,6 @@ notifications-python-client==5.5.1
# PaaS # PaaS
awscli-cwlogs>=1.4,<1.5 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 gds-metrics==0.2.0

View File

@@ -28,7 +28,7 @@ notifications-python-client==5.5.1
# PaaS # PaaS
awscli-cwlogs>=1.4,<1.5 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 gds-metrics==0.2.0