From e4ac96c2e4c2a1fcc6d4b80a09a676b502f41a59 Mon Sep 17 00:00:00 2001 From: Michael Wellman Date: Mon, 4 Nov 2024 10:33:28 -0500 Subject: [PATCH] Reverted --- app/celery/twilio_tasks.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/celery/twilio_tasks.py b/app/celery/twilio_tasks.py index f1f2e73308..576d2f46ce 100644 --- a/app/celery/twilio_tasks.py +++ b/app/celery/twilio_tasks.py @@ -13,15 +13,13 @@ def _get_notifications() -> list: current_app.logger.info('Getting notifications to update status') one_hour_ago = datetime.now(timezone.utc) - timedelta(hours=1) - five_minutes_ago = datetime.now(timezone.utc) - timedelta(minutes=5) - query = ( select([Notification]) .where(Notification.notification_type == 'sms') .where(Notification.sent_by == 'twilio') .where(~Notification.status.in_(NOTIFICATION_STATUS_TYPES_COMPLETED)) - .where(Notification.created_at > one_hour_ago) - .where(Notification.created_at < five_minutes_ago) + .where(Notification.created_at < one_hour_ago) + .where(Notification.created_at) .limit(current_app.config['TWILIO_STATUS_PAGE_SIZE']) ) current_app.logger.debug('Query: %s', query)