remove update-letter-notifications-statuses task

This commit is contained in:
stvnrlly
2022-12-07 12:21:32 -05:00
parent cb7b42c2cc
commit b08dc4375d
4 changed files with 0 additions and 189 deletions

View File

@@ -446,22 +446,6 @@ def handle_exception(task, notification, notification_id, exc):
current_app.logger.error('Max retry failed' + retry_msg)
@notify_celery.task(bind=True, name='update-letter-notifications-statuses')
def update_letter_notifications_statuses(self, filename):
notification_updates = parse_dvla_file(filename)
temporary_failures = []
for update in notification_updates:
check_billable_units(update)
update_letter_notification(filename, temporary_failures, update)
if temporary_failures:
# This will alert Notify that DVLA was unable to deliver the letters, we need to investigate
message = "DVLA response file: {filename} has failed letters with notification.reference {failures}" \
.format(filename=filename, failures=temporary_failures)
raise DVLAException(message)
@notify_celery.task(bind=True, name="record-daily-sorted-counts")
def record_daily_sorted_counts(self, filename):
sorted_letter_counts = defaultdict(int)

View File

@@ -5,7 +5,6 @@ from flask import Blueprint, current_app, jsonify, request
from app.celery.tasks import (
record_daily_sorted_counts,
update_letter_notifications_statuses,
)
from app.config import QueueNames
from app.notifications.utils import autoconfirm_subscription
@@ -53,7 +52,6 @@ def process_letter_response():
if filename.lower().endswith('rs.txt') or filename.lower().endswith('rsp.txt'):
current_app.logger.info('DVLA callback: Calling task to update letter notifications')
update_letter_notifications_statuses.apply_async([filename], queue=QueueNames.NOTIFY)
record_daily_sorted_counts.apply_async([filename], queue=QueueNames.NOTIFY)
return jsonify(