Delete send-scheduled-notifications task

This was added a few years ago, but never used.
This commit is contained in:
Katie Smith
2020-04-01 13:11:39 +01:00
parent e07dea27e1
commit bfd40a843c
4 changed files with 0 additions and 84 deletions

View File

@@ -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