From 7f4b140f97516874073d35cac9dee88a82fcced1 Mon Sep 17 00:00:00 2001 From: Ben Thorner Date: Mon, 24 Jan 2022 15:54:37 +0000 Subject: [PATCH] Rename function to make it consistent This is consistent with the new "on_date" function. It was going off the edge of my screen before in some parts of the code. --- app/celery/nightly_tasks.py | 4 ++-- app/dao/notifications_dao.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/celery/nightly_tasks.py b/app/celery/nightly_tasks.py index 04b3fc31a..54edbe889 100644 --- a/app/celery/nightly_tasks.py +++ b/app/celery/nightly_tasks.py @@ -22,7 +22,7 @@ from app.dao.jobs_dao import ( from app.dao.notifications_dao import ( dao_get_notifications_processing_time_stats, dao_timeout_notifications, - get_service_ids_that_have_notifications_from_before_timestamp, + get_service_ids_with_notifications_before, move_notifications_to_notification_history, ) from app.dao.service_data_retention_dao import ( @@ -107,7 +107,7 @@ def _delete_notifications_older_than_retention_by_type(notification_type): # get a list of all service ids that we'll need to delete for. Typically that might only be 5% of services. # This query takes a couple of mins to run. - service_ids_that_have_sent_notifications_recently = get_service_ids_that_have_notifications_from_before_timestamp( + service_ids_that_have_sent_notifications_recently = get_service_ids_with_notifications_before( notification_type, seven_days_ago ) diff --git a/app/dao/notifications_dao.py b/app/dao/notifications_dao.py index 4292f1c7a..df93fa4ee 100644 --- a/app/dao/notifications_dao.py +++ b/app/dao/notifications_dao.py @@ -784,7 +784,7 @@ def _duplicate_update_warning(notification, status): ) -def get_service_ids_that_have_notifications_from_before_timestamp(notification_type, timestamp): +def get_service_ids_with_notifications_before(notification_type, timestamp): return { row.service_id for row in db.session.query(