dont pass reply-to-addresses about

dont send reply_to_addresses around from process_job and send_email -
take it from the service in send_email_to_provider. also clean up
the kwarg in aws_ses.send_email to more accurately reflect what we
might pass in
This commit is contained in:
Leo Hemsted
2016-07-04 14:47:43 +01:00
parent 8dafab952e
commit f5e14f043d
5 changed files with 43 additions and 24 deletions

View File

@@ -106,7 +106,6 @@ def process_job(job_id):
create_uuid(),
encrypted,
datetime.utcnow().strftime(DATETIME_FORMAT)),
{'reply_to_addresses': service.reply_to_email_address},
queue='bulk-email')
finished = datetime.utcnow()
@@ -182,8 +181,7 @@ def send_email(self, service_id,
try:
_save_notification(created_at, notification, notification_id, service_id, EMAIL_TYPE, api_key_id, key_type)
send_email_to_provider.apply_async((service_id, notification_id, reply_to_addresses),
queue='email')
send_email_to_provider.apply_async((service_id, notification_id), queue='email')
current_app.logger.info("Email {} created at {}".format(notification_id, created_at))
statsd_client.incr("notifications.tasks.send-email")