✨(backend) add env variable to configure marketing service timeout
This change allows the marketing service timeout to be easily adjusted via an environment variable, eliminating the need for a new software release. Additionally, the update makes the code more explicit and easier to maintain.
This commit is contained in:
committed by
aleb_the_flash
parent
94ae5d52c2
commit
28538b63da
@@ -121,7 +121,9 @@ class OIDCAuthenticationBackend(MozillaOIDCAuthenticationBackend):
|
||||
contact_data = ContactData(
|
||||
email=email, attributes={"VISIO_SOURCE": ["SIGNIN"]}
|
||||
)
|
||||
marketing_service.create_contact(contact_data, timeout=1)
|
||||
marketing_service.create_contact(
|
||||
contact_data, timeout=settings.BREVO_API_TIMEOUT
|
||||
)
|
||||
except (ContactCreationError, ImproperlyConfigured, ImportError):
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user