From 3b354de2fc05735f8b55c6834bfe1f62d070a50b Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 23 Jan 2022 18:40:06 +0000 Subject: [PATCH] Lower email sending rate limit again --- app/tasks/emails.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/tasks/emails.py b/app/tasks/emails.py index 8f959c7a..7dca096c 100644 --- a/app/tasks/emails.py +++ b/app/tasks/emails.py @@ -79,7 +79,7 @@ def send_unsubscribe_verify(email, locale): mail.send(msg) -@celery.task(rate_limit="50/m") +@celery.task(rate_limit="25/m") def send_email_with_reason(email: str, locale: str, subject: str, text: str, html: str, reason: str): sub = get_email_subscription(email) if sub.blacklisted: @@ -95,14 +95,14 @@ def send_email_with_reason(email: str, locale: str, subject: str, text: str, htm mail.send(msg) -@celery.task(rate_limit="50/m") +@celery.task(rate_limit="25/m") def send_user_email(email: str, locale: str, subject: str, text: str, html=None): with force_locale(locale or "en"): return send_email_with_reason(email, locale, subject, text, html, gettext("You are receiving this email because you are a registered user of ContentDB.")) -@celery.task(rate_limit="50/m") +@celery.task(rate_limit="25/m") def send_anon_email(email: str, locale: str, subject: str, text: str, html=None): with force_locale(locale or "en"): return send_email_with_reason(email, locale, subject, text, html,