Skip to content

Commit

Permalink
Add email max batch and throttle setup
Browse files Browse the repository at this point in the history
Finetune Django mailer setup by adding email max batch
and throttle settings with default values.

Refs #PV-872
  • Loading branch information
mhieta committed Oct 29, 2024
1 parent 825a02d commit 153f3c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
THIRD_PARTY_PARKING_PROVIDER_EMAILS=(list, []),
MAILER_USE_FILE_LOCK=(bool, False),
MAILER_LOCK_PATH=(str, "/tmp"),
MAILER_EMAIL_MAX_BATCH=(int, 200),
MAILER_EMAIL_THROTTLE=(int, 1),
FIELD_ENCRYPTION_KEYS=(str, ""),
SENTRY_DSN=(str, ""),
SENTRY_ENVIRONMENT=(str, ""),
Expand Down Expand Up @@ -310,6 +312,8 @@
EMAIL_BACKEND = "mailer.backend.DbBackend"
MAILER_USE_FILE_LOCK = env("MAILER_USE_FILE_LOCK")
MAILER_LOCK_PATH = env("MAILER_LOCK_PATH")
MAILER_EMAIL_MAX_BATCH = env("MAILER_EMAIL_MAX_BATCH")
MAILER_EMAIL_THROTTLE = env("MAILER_EMAIL_THROTTLE")

sentry_sdk.init(
dsn=env.str("SENTRY_DSN"),
Expand Down

0 comments on commit 153f3c8

Please sign in to comment.