mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Delete send-scheduled-notifications task
This was added a few years ago, but never used.
This commit is contained in:
@@ -33,7 +33,6 @@ from app.models import (
|
||||
Notification,
|
||||
NotificationHistory,
|
||||
ProviderDetails,
|
||||
ScheduledNotification,
|
||||
KEY_TYPE_NORMAL,
|
||||
KEY_TYPE_TEST,
|
||||
LETTER_TYPE,
|
||||
@@ -652,26 +651,6 @@ def dao_created_scheduled_notification(scheduled_notification):
|
||||
db.session.commit()
|
||||
|
||||
|
||||
@statsd(namespace="dao")
|
||||
def dao_get_scheduled_notifications():
|
||||
notifications = Notification.query.join(
|
||||
ScheduledNotification
|
||||
).filter(
|
||||
ScheduledNotification.scheduled_for < datetime.utcnow(),
|
||||
ScheduledNotification.pending).all()
|
||||
|
||||
return notifications
|
||||
|
||||
|
||||
def set_scheduled_notification_to_processed(notification_id):
|
||||
db.session.query(ScheduledNotification).filter(
|
||||
ScheduledNotification.notification_id == notification_id
|
||||
).update(
|
||||
{'pending': False}
|
||||
)
|
||||
db.session.commit()
|
||||
|
||||
|
||||
def dao_get_total_notifications_sent_per_day_for_performance_platform(start_date, end_date):
|
||||
"""
|
||||
SELECT
|
||||
|
||||
Reference in New Issue
Block a user