diff options
| author | Dennis Fink | 2026-11-14 18:44:23 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-14 18:44:23 +0100 |
| commit | 968e1b4e4a6fbd5a15037cdb11a3f9dee5108570 (patch) | |
| tree | 0096a0125c4d94a047e5bd24288e1f3f4a58ada5 /webmentions_ssg/tasks/notifications.py | |
| parent | 2366d455c7d1ae16c84e0bcbffb94ed762c16832 (diff) | |
| download | webmentions-ssg-968e1b4e4a6fbd5a15037cdb11a3f9dee5108570.tar.gz webmentions-ssg-968e1b4e4a6fbd5a15037cdb11a3f9dee5108570.zip | |
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.
Diffstat (limited to 'webmentions_ssg/tasks/notifications.py')
| -rw-r--r-- | webmentions_ssg/tasks/notifications.py | 12 |
1 files changed, 10 insertions, 2 deletions
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 |
