mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-13 06:01:42 -05:00
Merge pull request #2871 from alphagov/utils-bump
bump utils to fix statsd timing bug
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user