signups: Add basic logging for new signup processing.

This commit is contained in:
Tim Abbott 2017-09-22 13:57:35 -07:00
parent f78dd33037
commit ec61a070b4
1 changed files with 3 additions and 0 deletions

View File

@ -153,6 +153,9 @@ class QueueProcessingWorker(object):
class SignupWorker(QueueProcessingWorker):
def consume(self, data):
# type: (Mapping[str, Any]) -> None
user_profile = get_user_profile_by_id(data['user_id'])
logging.info("Processing signup for user %s in realm %s" % (
user_profile.email, user_profile.realm.string_id))
if settings.MAILCHIMP_API_KEY and settings.PRODUCTION:
endpoint = "https://%s.api.mailchimp.com/3.0/lists/%s/members" % \
(settings.MAILCHIMP_API_KEY.split('-')[1], settings.ZULIP_FRIENDS_LIST_ID)