mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:15:19 -05:00
Remove the beat job.
Add logging to the task.
This commit is contained in:
@@ -51,9 +51,11 @@ def run_scheduled_jobs():
|
||||
@statsd(namespace="tasks")
|
||||
def send_scheduled_notifications():
|
||||
try:
|
||||
for notification in dao_get_scheduled_notifications():
|
||||
scheduled_notifications = dao_get_scheduled_notifications()
|
||||
for notification in scheduled_notifications:
|
||||
send_notification_to_queue(notification, notification.service.research_mode)
|
||||
|
||||
current_app.logger.info(
|
||||
"Sent {} scheudled notifications to the provider queue".format(len(scheduled_notifications)))
|
||||
except SQLAlchemyError as e:
|
||||
current_app.logger.exception("Failed to send scheduled notifications")
|
||||
raise
|
||||
|
||||
@@ -109,11 +109,6 @@ class Config(object):
|
||||
'schedule': crontab(minute=1),
|
||||
'options': {'queue': 'periodic'}
|
||||
},
|
||||
'send-scheduled-notifications': {
|
||||
'task': 'send-scheduled-notifications',
|
||||
'schedule': crontab(minute=1),
|
||||
'options': {'queue': 'periodic'}
|
||||
},
|
||||
'delete-verify-codes': {
|
||||
'task': 'delete-verify-codes',
|
||||
'schedule': timedelta(minutes=63),
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
9772
|
||||
Reference in New Issue
Block a user