mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-06 09:08:24 -04:00
Delete functions which call the job statistics tasks
The JobStatistics table is going to be deleted. There are currently 3 tasks which use the JobStatistics model via the Statistics DAO, so we need to make sure that these tasks aren't being used before they are deleted in a separate PR. This commit deletes: * The `create_initial_notification_statistic_tasks` function which gets used to call the `record_initial_job_statistics` task. * The `create_outcome_notification_statistic_tasks` function which gets used to call the `record_outcome_job_statistics` task. * And the scheduling of the `timeout-job-statistics` scheduled task.
This commit is contained in:
@@ -31,7 +31,6 @@ from app.models import (
|
||||
NOTIFICATION_SENT,
|
||||
NOTIFICATION_SENDING
|
||||
)
|
||||
from app.celery.statistics_tasks import create_initial_notification_statistic_tasks
|
||||
|
||||
|
||||
def send_sms_to_provider(notification):
|
||||
@@ -83,8 +82,6 @@ def send_sms_to_provider(notification):
|
||||
notification.billable_units = template.fragment_count
|
||||
update_notification(notification, provider, notification.international)
|
||||
|
||||
create_initial_notification_statistic_tasks(notification)
|
||||
|
||||
current_app.logger.debug(
|
||||
"SMS {} sent to provider {} at {}".format(notification.id, provider.get_name(), notification.sent_at)
|
||||
)
|
||||
@@ -138,8 +135,6 @@ def send_email_to_provider(notification):
|
||||
notification.reference = reference
|
||||
update_notification(notification, provider)
|
||||
|
||||
create_initial_notification_statistic_tasks(notification)
|
||||
|
||||
current_app.logger.debug(
|
||||
"Email {} sent to provider at {}".format(notification.id, notification.sent_at)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user