From 968e1b4e4a6fbd5a15037cdb11a3f9dee5108570 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sat, 14 Nov 2026 18:44:23 +0100 Subject: docs(core): standardize reST docstrings Expand function and method documentation with consistent reST parameter, return, and exception fields while clarifying behavior where additional context is useful. Normalize test and migration docstrings to the same documentation conventions. --- webmentions_ssg/tasks/notifications.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'webmentions_ssg/tasks/notifications.py') diff --git a/webmentions_ssg/tasks/notifications.py b/webmentions_ssg/tasks/notifications.py index fc1b475..b1762d5 100644 --- a/webmentions_ssg/tasks/notifications.py +++ b/webmentions_ssg/tasks/notifications.py @@ -15,14 +15,22 @@ from ..models import ReceivedStatus, ReceivedWebmention def send_webmention_digest() -> None: - """Send one digest of verified, previously unreported Webmentions.""" + """Send one digest of verified, previously unreported Webmentions. + + Acquire the digest lock before notifying recipients about previously unreported + verified mentions. + """ # Resolve the lock against the current Huey backend, not the import-time one. with huey.lock_task("send-webmention-digest"): _send_webmention_digest() def _send_webmention_digest() -> None: - """Do the work while the current backend's digest lock is held.""" + """Do the work while the current backend's digest lock is held. + + Collect verified mentions, send the configured message, and persist notification + timestamps. + """ recipient = current_app.config.get("NOTIFICATION_EMAIL") if not recipient: return -- cgit v1.3.1