mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-13 08:42:21 -05:00
Co-Authored-By: Chris Hill-Scott <me@quis.cc>
Use .format instead of concatenation to avoid type issues Trying to concatenate uuid onto a string was throwing an error. Also it is not possible to use uuid in parametrize statements it seems as it messes up with running tests on multiple threads
This commit is contained in:
@@ -271,14 +271,20 @@ def check_for_services_with_high_failure_rates_or_sending_to_tv_numbers():
|
||||
len(services_with_failures)
|
||||
)
|
||||
for service in services_with_failures:
|
||||
service_dashboard = current_app.config['ADMIN_BASE_URL'] + "/services/" + service.service_id
|
||||
service_dashboard = "{}/services/{}".format(
|
||||
current_app.config['ADMIN_BASE_URL'],
|
||||
str(service.service_id),
|
||||
)
|
||||
message += "service: {} failure rate: {},\n".format(service_dashboard, service.permanent_failure_rate)
|
||||
elif services_sending_to_tv_numbers:
|
||||
message += "{} service(s) have sent over 100 sms messages to tv numbers in last 24 hours:\n".format(
|
||||
len(services_sending_to_tv_numbers)
|
||||
)
|
||||
for service in services_sending_to_tv_numbers:
|
||||
service_dashboard = current_app.config['ADMIN_BASE_URL'] + "/services/" + service.service_id
|
||||
service_dashboard = "{}/services/{}".format(
|
||||
current_app.config['ADMIN_BASE_URL'],
|
||||
str(service.service_id),
|
||||
)
|
||||
message += "service: {} count of sms to tv numbers: {},\n".format(
|
||||
service_dashboard, service.notification_count
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user