mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
bump utils to fix statsd timing bug
statsd timing should always be in seconds, not milliseconds
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user