aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/consumer.py
diff options
context:
space:
mode:
authorDennis Fink2026-10-29 20:59:48 +0100
committerDennis Fink2026-10-29 20:59:48 +0100
commitedd7c0c2220ba12c2a773f9ba1cf6e0e7a273856 (patch)
treec067d16841e3d3441e3b4c6f7ed833a6d57fae04 /webmentions_ssg/tasks/consumer.py
parent9a1e863079b64883beadaba7b283621f1b3cf70a (diff)
downloadwebmentions-ssg-edd7c0c2220ba12c2a773f9ba1cf6e0e7a273856.tar.gz
webmentions-ssg-edd7c0c2220ba12c2a773f9ba1cf6e0e7a273856.zip
feat(receiver): send Webmention notification digests
Batch verified Webmention notifications into a scheduled digest so bursts of incoming mentions do not generate a separate email for every verification. Track which mentions have already been reported and leave them pending when SMTP delivery fails so a later digest can retry safely.
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/tasks/consumer.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/webmentions_ssg/tasks/consumer.py b/webmentions_ssg/tasks/consumer.py
index 4dd10c7..559ef5d 100644
--- a/webmentions_ssg/tasks/consumer.py
+++ b/webmentions_ssg/tasks/consumer.py
@@ -26,6 +26,11 @@ def create_consumer() -> Huey:
schedule = crontab(*app.config["SCANNER_SCHEDULE"].split(), strict=True)
HUEY.periodic_task(schedule)(scanner.scan_sources)
+ notification_schedule = crontab(
+ *app.config["NOTIFICATION_SCHEDULE"].split(), strict=True
+ )
+ HUEY.periodic_task(notification_schedule)(notifications.send_webmention_digest)
+
return HUEY.huey