mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-04 05:30:53 -04:00
remove update-letter-notifications-statuses task
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user