worker: Retry signups queue event on 400.

This commit is contained in:
Umair Khan
2017-10-06 09:41:18 +05:00
committed by Tim Abbott
parent 19e2551e82
commit 435fe40199

View File

@@ -190,6 +190,8 @@ class SignupWorker(QueueProcessingWorker):
if r.status_code == 400 and ujson.loads(r.text)['title'] == 'Member Exists':
logging.warning("Attempted to sign up already existing email to list: %s" %
(data['email_address'],))
elif r.status_code == 400:
retry_event('signups', data, lambda e: r.raise_for_status())
else:
r.raise_for_status()