mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Removed the performance testing statsd calls as they are no longer
needed for monitoring the performance of the v2 endpoints. They were put in as a temporary measure whilst sustained performance testing was taking place.
This commit is contained in:
@@ -46,7 +46,6 @@ def check_placeholders(template_object):
|
||||
raise BadRequestError(fields=[{'template': message}], message=message)
|
||||
|
||||
|
||||
@statsd(namespace="performance-testing")
|
||||
def persist_notification(
|
||||
*,
|
||||
template_id,
|
||||
@@ -116,7 +115,6 @@ def persist_notification(
|
||||
return notification
|
||||
|
||||
|
||||
@statsd(namespace="performance-testing")
|
||||
def send_notification_to_queue(notification, research_mode, queue=None):
|
||||
if research_mode or notification.key_type == KEY_TYPE_TEST:
|
||||
queue = QueueNames.RESEARCH_MODE
|
||||
|
||||
@@ -48,7 +48,6 @@ def check_service_over_daily_message_limit(key_type, service):
|
||||
raise TooManyRequestsError(service.message_limit)
|
||||
|
||||
|
||||
@statsd(namespace="performance-testing")
|
||||
def check_rate_limiting(service, api_key):
|
||||
check_service_over_api_rate_limit(service, api_key)
|
||||
check_service_over_daily_message_limit(api_key.key_type, service)
|
||||
@@ -83,14 +82,12 @@ def service_has_permission(notify_type, permissions):
|
||||
return notify_type in [p.permission for p in permissions]
|
||||
|
||||
|
||||
@statsd(namespace="performance-testing")
|
||||
def check_service_has_permission(notify_type, permissions):
|
||||
if not service_has_permission(notify_type, permissions):
|
||||
raise BadRequestError(message="Cannot send {}".format(
|
||||
get_public_notify_type_text(notify_type, plural=True)))
|
||||
|
||||
|
||||
@statsd(namespace="performance-testing")
|
||||
def check_service_can_schedule_notification(permissions, scheduled_for):
|
||||
if scheduled_for:
|
||||
if not service_has_permission(SCHEDULE_NOTIFICATIONS, permissions):
|
||||
@@ -125,7 +122,6 @@ def check_sms_content_char_count(content_count):
|
||||
raise BadRequestError(message=message)
|
||||
|
||||
|
||||
@statsd(namespace="performance-testing")
|
||||
def validate_template(template_id, personalisation, service, notification_type):
|
||||
try:
|
||||
template = templates_dao.dao_get_template_by_id_and_service_id(
|
||||
|
||||
Reference in New Issue
Block a user