Revert "ensure we're passing through api keys and key types from notifications"

This reverts commit 25d1777937.
This commit is contained in:
Martyn Inglis
2017-03-30 10:38:41 +01:00
parent bf99921cff
commit 385a73da2b
4 changed files with 20 additions and 85 deletions

View File

@@ -124,14 +124,7 @@ def process_row(row_number, recipient, personalisation, template, job, service):
def send_notification_to_persist_queue(
notification_id,
service,
template_type,
encrypted,
api_key_id,
key_type,
priority=False,
research_mode=False
notification_id, service, template_type, encrypted, priority=False, research_mode=False
):
queues = {
SMS_TYPE: 'db-sms',
@@ -156,12 +149,8 @@ def send_notification_to_persist_queue(
str(service.id),
notification_id,
encrypted,
datetime.utcnow().strftime(DATETIME_FORMAT),
datetime.utcnow().strftime(DATETIME_FORMAT)
),
kwargs={
'api_key_id': api_key_id,
'key_type': key_type
},
queue=queue_name
)

View File

@@ -147,14 +147,12 @@ def send_notification(notification_type):
if not simulated:
tasks.send_notification_to_persist_queue(
notification_id=notification_model.id,
service=service,
template_type=template.template_type,
encrypted=encrypted,
api_key_id=str(notification_model.api_key_id),
key_type=api_user.key_type,
priority=template.process_type == PRIORITY,
research_mode=service.research_mode or api_user.key_type == KEY_TYPE_TEST
notification_model.id,
service,
template.template_type,
encrypted,
template.process_type == PRIORITY,
service.research_mode or api_user.key_type == KEY_TYPE_TEST
)
# queue_name = 'notify' if template.process_type == PRIORITY else None
# send_notification_to_queue(notification=notification_model,

View File

@@ -68,14 +68,12 @@ def post_notification(notification_type):
if not simulated:
tasks.send_notification_to_persist_queue(
notification_id=notification.id,
service=service,
template_type=template.template_type,
encrypted=encrypted,
api_key_id=str(notification.api_key_id),
key_type=api_user.key_type,
priority=template.process_type == PRIORITY,
research_mode=service.research_mode or api_user.key_type == KEY_TYPE_TEST
notification.id,
service,
template.template_type,
encrypted,
template.process_type == PRIORITY,
service.research_mode or api_user.key_type == KEY_TYPE_TEST
)
# not doing this during paas migration
# queue_name = 'notify' if template.process_type == PRIORITY else None