diff --git a/app/celery/scheduled_tasks.py b/app/celery/scheduled_tasks.py index 87eb3ba2f..27b2b8953 100644 --- a/app/celery/scheduled_tasks.py +++ b/app/celery/scheduled_tasks.py @@ -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 diff --git a/app/config.py b/app/config.py index 807d31071..b87f4d031 100644 --- a/app/config.py +++ b/app/config.py @@ -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), diff --git a/celerybeat.pid b/celerybeat.pid deleted file mode 100644 index d2acb3a18..000000000 --- a/celerybeat.pid +++ /dev/null @@ -1 +0,0 @@ -9772