From 4bdc73659e2103883ababe7c3a2829bec38c7e6e Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 29 Oct 2020 15:28:06 +0100 Subject: [PATCH] Stagger outgoing news emails Set to a maximum of one outgoing email per 30 minutes --- pgweb/news/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pgweb/news/util.py b/pgweb/news/util.py index 2c88d78c..c14e39f7 100644 --- a/pgweb/news/util.py +++ b/pgweb/news/util.py @@ -1,6 +1,7 @@ from django.template.loader import get_template from django.conf import settings +from datetime import timedelta import os import hmac import hashlib @@ -98,4 +99,6 @@ def send_news_email(news): htmlbody=html, attachments=attachments, headers=headers, + staggertype='news', + stagger=timedelta(minutes=30), ) -- 2.39.5