Skip to content

Commit

Permalink
Reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
mchlwellman committed Nov 4, 2024
1 parent 32d8ddc commit e4ac96c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/celery/twilio_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e4ac96c

Please sign in to comment.