This massive set of changes uses the new queue names object throughout the app and tests.

Lots of changes, all changing the line of code that puts things into queues, and the code that tests that.
This commit is contained in:
Martyn Inglis
2017-05-25 10:51:49 +01:00
parent 21586c917c
commit 2591d3a1df
28 changed files with 128 additions and 123 deletions

View File

@@ -2,6 +2,7 @@ from flask import request, jsonify, current_app
from sqlalchemy.orm.exc import NoResultFound
from app import api_user, authenticated_service
from app.config import QueueNames
from app.dao import services_dao, templates_dao
from app.models import SMS_TYPE, EMAIL_TYPE, PRIORITY
from app.notifications.process_notifications import (
@@ -57,7 +58,7 @@ def post_notification(notification_type):
simulated=simulated)
if not simulated:
queue_name = 'priority' if template.process_type == PRIORITY else None
queue_name = QueueNames.PRIORITY if template.process_type == PRIORITY else None
send_notification_to_queue(
notification=notification,
research_mode=authenticated_service.research_mode,