notify-api-433b remove research mode

This commit is contained in:
Kenneth Kehl
2023-08-25 12:09:00 -07:00
parent b679550d97
commit 5a350560d7
32 changed files with 88 additions and 305 deletions

View File

@@ -238,7 +238,6 @@ def fetch_stats_for_all_services_by_date_range(start_date, end_date, include_fro
FactNotificationStatus.service_id.label('service_id'),
Service.name.label('name'),
Service.restricted.label('restricted'),
Service.research_mode.label('research_mode'),
Service.active.label('active'),
Service.created_at.label('created_at'),
FactNotificationStatus.notification_type.label('notification_type'),
@@ -252,7 +251,6 @@ def fetch_stats_for_all_services_by_date_range(start_date, end_date, include_fro
FactNotificationStatus.service_id.label('service_id'),
Service.name,
Service.restricted,
Service.research_mode,
Service.active,
Service.created_at,
FactNotificationStatus.notification_type,
@@ -286,7 +284,6 @@ def fetch_stats_for_all_services_by_date_range(start_date, end_date, include_fro
Service.id.label('service_id'),
Service.name.label('name'),
Service.restricted.label('restricted'),
Service.research_mode.label('research_mode'),
Service.active.label('active'),
Service.created_at.label('created_at'),
subquery.c.notification_type.label('notification_type'),
@@ -302,7 +299,6 @@ def fetch_stats_for_all_services_by_date_range(start_date, end_date, include_fro
all_stats_table.c.service_id,
all_stats_table.c.name,
all_stats_table.c.restricted,
all_stats_table.c.research_mode,
all_stats_table.c.active,
all_stats_table.c.created_at,
all_stats_table.c.notification_type,
@@ -312,7 +308,6 @@ def fetch_stats_for_all_services_by_date_range(start_date, end_date, include_fro
all_stats_table.c.service_id,
all_stats_table.c.name,
all_stats_table.c.restricted,
all_stats_table.c.research_mode,
all_stats_table.c.active,
all_stats_table.c.created_at,
all_stats_table.c.notification_type,
@@ -482,7 +477,6 @@ def fetch_monthly_notification_statuses_per_service(start_date, end_date):
FactNotificationStatus.notification_status != NOTIFICATION_CREATED,
Service.active.is_(True),
FactNotificationStatus.key_type != KEY_TYPE_TEST,
Service.research_mode.is_(False),
Service.restricted.is_(False),
FactNotificationStatus.local_date >= start_date,
FactNotificationStatus.local_date <= end_date,

View File

@@ -285,7 +285,6 @@ def dao_create_service(
permission_dao.add_default_service_permissions_for_user(user, service)
service.id = service_id or uuid.uuid4() # must be set now so version history model can use same id
service.active = True
service.research_mode = False
for permission in service_permissions:
service_permission = ServicePermission(service_id=service.id, permission=permission)
@@ -431,7 +430,6 @@ def dao_fetch_todays_stats_for_all_services(include_from_test_key=True, only_act
Service.id.label('service_id'),
Service.name,
Service.restricted,
Service.research_mode,
Service.active,
Service.created_at,
subquery.c.notification_type,
@@ -495,7 +493,6 @@ def dao_find_services_sending_to_tv_numbers(start_date, end_date, threshold=500)
Notification.notification_type == SMS_TYPE,
func.substr(Notification.normalised_to, 3, 7) == '7700900',
Service.restricted == False, # noqa
Service.research_mode == False, # noqa
Service.active == True, # noqa
).group_by(
Notification.service_id,
@@ -515,7 +512,6 @@ def dao_find_services_with_high_failure_rates(start_date, end_date, threshold=10
Notification.key_type != KEY_TYPE_TEST,
Notification.notification_type == SMS_TYPE,
Service.restricted == False, # noqa
Service.research_mode == False, # noqa
Service.active == True, # noqa
).group_by(
Notification.service_id,
@@ -541,7 +537,6 @@ def dao_find_services_with_high_failure_rates(start_date, end_date, threshold=10
Notification.notification_type == SMS_TYPE,
Notification.status == NOTIFICATION_PERMANENT_FAILURE,
Service.restricted == False, # noqa
Service.research_mode == False, # noqa
Service.active == True, # noqa
).group_by(
Notification.service_id,