From 77f3e7218c9c956b0ddcdc85753444543a70aba4 Mon Sep 17 00:00:00 2001 From: Jumana Bahrainwala Date: Thu, 19 Dec 2024 20:33:56 +0000 Subject: [PATCH] additiona places it was left --- app/celery/process_pinpoint_receipts_tasks.py | 4 ++-- app/celery/process_ses_receipts_tasks.py | 4 ++-- app/celery/process_sns_receipts_tasks.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/celery/process_pinpoint_receipts_tasks.py b/app/celery/process_pinpoint_receipts_tasks.py index 5edd796169..54c6865385 100644 --- a/app/celery/process_pinpoint_receipts_tasks.py +++ b/app/celery/process_pinpoint_receipts_tasks.py @@ -1,4 +1,4 @@ -from datetime import datetime +from datetime import datetime, timezone from typing import Union from flask import current_app, json @@ -120,7 +120,7 @@ def process_pinpoint_results(self, response): if not annual_limit_client.was_seeded_today(service_id): annual_limit_client.set_seeded_at(service_id) notifications_to_seed = fetch_notification_status_for_service_for_day( - convert_utc_to_local_timezone(datetime.utcnow()), + datetime.now(timezone.utc), service_id=service_id, ) annual_limit_client.seed_annual_limit_notifications( diff --git a/app/celery/process_ses_receipts_tasks.py b/app/celery/process_ses_receipts_tasks.py index 5d2c29b133..f10aa35b07 100644 --- a/app/celery/process_ses_receipts_tasks.py +++ b/app/celery/process_ses_receipts_tasks.py @@ -1,4 +1,4 @@ -from datetime import datetime +from datetime import datetime, timezone from flask import current_app, json from notifications_utils.statsd_decorators import statsd @@ -97,7 +97,7 @@ def process_ses_results(self, response): # noqa: C901 if not annual_limit_client.was_seeded_today(service_id): annual_limit_client.set_seeded_at(service_id) notifications_to_seed = fetch_notification_status_for_service_for_day( - convert_utc_to_local_timezone(datetime.utcnow()), + convert_utc_to_local_timezone(datetime.now(timezone.utc)), service_id=service_id, ) annual_limit_client.seed_annual_limit_notifications( diff --git a/app/celery/process_sns_receipts_tasks.py b/app/celery/process_sns_receipts_tasks.py index 326784f3e3..2029db9ae5 100644 --- a/app/celery/process_sns_receipts_tasks.py +++ b/app/celery/process_sns_receipts_tasks.py @@ -1,4 +1,4 @@ -from datetime import datetime +from datetime import datetime, timezone from flask import current_app, json from notifications_utils.statsd_decorators import statsd @@ -77,7 +77,7 @@ def process_sns_results(self, response): if not annual_limit_client.was_seeded_today(service_id): annual_limit_client.set_seeded_at(service_id) notifications_to_seed = fetch_notification_status_for_service_for_day( - convert_utc_to_local_timezone(datetime.utcnow()), + convert_utc_to_local_timezone(datetime.now(timezone.utc)), service_id=service_id, ) annual_limit_client.seed_annual_limit_notifications(