Skip to content

Conversation

@timcowlishaw
Copy link
Collaborator

....using the Brevo API.

Contacts are tagged with a "source" label to ensure that we can track that they arrived through the admin portal, and the call to the Brevo API is handled by a dramatiq worker, so that retries are automatically handled on error, and the main web process is not blocked on the API call.

came from a admin portal signup.
"""
configuration = Configuration()
configuration.api_key["api-key"] = settings.BREVO_API_KEY
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tim, can you let me know what happens if there is no API key set here from the environment variables?

My assumption is that we end up with exponential back off as the dramatiq worker keeps trying to connect to Brevo, but I can't tell that's what happens.

We might want to raise an explicit exception like NoBrevoCredentials here, to make it explicit why this is failing, or run a check before we try to use the BREVO_* constants.

I think we might need to update the various places we have env vars set too (groan...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants