diff --git a/app/celery/scheduled_tasks.py b/app/celery/scheduled_tasks.py index 3acdd5341..fbea3bdb0 100644 --- a/app/celery/scheduled_tasks.py +++ b/app/celery/scheduled_tasks.py @@ -16,7 +16,7 @@ from app.dao.notifications_dao import ( dao_timeout_notifications, is_delivery_slow_for_provider ) -from app.dao.statistics_dao import timeout_job_statistics as dao_timeout_job_statistics +from app.dao.statistics_dao import dao_timeout_job_statistics from app.dao.provider_details_dao import ( get_current_provider, dao_toggle_sms_provider diff --git a/app/celery/statistics_tasks.py b/app/celery/statistics_tasks.py index d7f0fc8c3..a82a3791f 100644 --- a/app/celery/statistics_tasks.py +++ b/app/celery/statistics_tasks.py @@ -14,7 +14,7 @@ from app.models import NOTIFICATION_STATUS_TYPES_COMPLETED def create_initial_notification_statistic_tasks(notification): - if notification.job_id and notification.status not in NOTIFICATION_STATUS_TYPES_COMPLETED: + if notification.job_id and notification.status: record_initial_job_statistics.apply_async((str(notification.id),), queue="statistics")