Skip to content

Commit

Permalink
requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanParish committed Dec 19, 2024
1 parent 114bc09 commit 3251030
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/dao/fact_notification_status_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ def fetch_monthly_notification_statuses_per_service(
else_=0,
)
).label('count_delivered'),
# TODO: remove this after technical-failure is removed from the codebase
# TODO 2191 - remove this after technical-failure is removed from the codebase
func.sum(
case(
[
Expand Down
13 changes: 8 additions & 5 deletions app/delivery/send_to_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
get_provider_details_by_notification_type,
)
from app.dao.templates_dao import dao_get_template_by_id
from app.exceptions import NotificationTechnicalFailureException, InvalidProviderException, InactiveServiceException
from app.exceptions import InactiveServiceException, InvalidProviderException, NotificationTechnicalFailureException
from app.feature_flags import is_gapixel_enabled, is_feature_enabled, FeatureFlag
from app.googleanalytics.pixels import build_dynamic_ga4_pixel_tracking_url
from app.models import (
Expand Down Expand Up @@ -294,11 +294,14 @@ def get_html_email_options(notification: Notification) -> Dict[str, Union[str, b


def inactive_service_failure(notification: Notification):
# notification.status = NOTIFICATION_PERMANENT_FAILURE
# dao_update_notification(notification)
"""Called when the service is inactive to raise InactiveServiceException with the proper error message.
Raises:
InactiveServiceException: always
"""
raise InactiveServiceException(
f'Send {notification.notification_type} for notification {notification.id} to provider is not allowed: '
f'service {notification.service_id} is inactive'
f'Send {notification.notification_type} to provider is not allowed. '
f'Service {notification.service_id} is inactive. Notification {notification.id}'
)


Expand Down
4 changes: 2 additions & 2 deletions app/service/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def format_admin_stats(statistics):
counts[row.notification_type]['test-key'] += row.count
else:
counts[row.notification_type]['total'] += row.count
# TODO: remove this after technical-failure is removed from the codebase
# TODO 2191 - remove this after technical-failure is removed from the codebase
if row.status in ('technical-failure', 'permanent-failure', 'temporary-failure', 'virus-scan-failed'):
counts[row.notification_type]['failures'][row.status] += row.count

Expand All @@ -45,7 +45,7 @@ def create_stats_dict():
stats_dict[template][status] = 0

stats_dict[template]['failures'] = {
# TODO: remove this after technical-failure is removed from the codebase
# TODO 2191 - remove this after technical-failure is removed from the codebase
'technical-failure': 0,
'permanent-failure': 0,
'temporary-failure': 0,
Expand Down
1 change: 0 additions & 1 deletion app/va/identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from app.constants import STATUS_REASON_NO_PROFILE


# TODO: Refactor this file to have actual classes that contain suffix, oid properties etc instead of all these dicts
class IdentifierType(Enum):
VA_PROFILE_ID = 'VAPROFILEID'
PID = 'PID'
Expand Down

0 comments on commit 3251030

Please sign in to comment.