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:
Katie Smith
2018-03-01 16:52:52 +00:00
parent 0c1d5c12a3
commit 7f2e9f507e
9 changed files with 4 additions and 276 deletions

View File

@@ -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)
)