projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
adf5eb2
)
Stagger outgoing news emails
author
Magnus Hagander
<magnus@hagander.net>
Thu, 29 Oct 2020 14:28:06 +0000
(15:28 +0100)
committer
Magnus Hagander
<magnus@hagander.net>
Thu, 29 Oct 2020 14:28:06 +0000
(15:28 +0100)
Set to a maximum of one outgoing email per 30 minutes
pgweb/news/util.py
patch
|
blob
|
blame
|
history
diff --git
a/pgweb/news/util.py
b/pgweb/news/util.py
index 2c88d78c7b234b7211735ab4e986dc6e6b7599ae..c14e39f7387190f860708b60bced338b95876828 100644
(file)
--- 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),
)