Revert "Reinstating the 2 task model for API submitted notifications."

This reverts commit 1c154c4113.
This commit is contained in:
Martyn Inglis
2017-03-30 10:46:23 +01:00
parent 5cd0507e99
commit 7dcd3164e2
8 changed files with 106 additions and 348 deletions

View File

@@ -123,39 +123,6 @@ def process_row(row_number, recipient, personalisation, template, job, service):
)
def send_notification_to_persist_queue(
notification_id, service, template_type, encrypted, priority=False, research_mode=False
):
queues = {
SMS_TYPE: 'db-sms',
EMAIL_TYPE: 'db-email'
}
send_fns = {
SMS_TYPE: send_sms,
EMAIL_TYPE: send_email
}
send_fn = send_fns[template_type]
if research_mode:
queue_name = "research-mode"
elif priority:
queue_name = "notify"
else:
queue_name = queues[template_type]
send_fn.apply_async(
(
str(service.id),
notification_id,
encrypted,
datetime.utcnow().strftime(DATETIME_FORMAT)
),
queue=queue_name
)
def __sending_limits_for_job_exceeded(service, job, job_id):
total_sent = fetch_todays_total_message_count(service.id)