aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/retention.py
diff options
context:
space:
mode:
authorDennis Fink2026-11-14 18:44:23 +0100
committerDennis Fink2026-11-14 18:44:23 +0100
commit968e1b4e4a6fbd5a15037cdb11a3f9dee5108570 (patch)
tree0096a0125c4d94a047e5bd24288e1f3f4a58ada5 /webmentions_ssg/tasks/retention.py
parent2366d455c7d1ae16c84e0bcbffb94ed762c16832 (diff)
downloadwebmentions-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 '')
-rw-r--r--webmentions_ssg/tasks/retention.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/webmentions_ssg/tasks/retention.py b/webmentions_ssg/tasks/retention.py
index 86283b7..2c35cc7 100644
--- a/webmentions_ssg/tasks/retention.py
+++ b/webmentions_ssg/tasks/retention.py
@@ -20,6 +20,11 @@ def purge_old_received_webmentions() -> int:
The status/time predicate is checked by the database in one DELETE, so a
row recently requeued for verification is not purged based on a stale read.
Outgoing sources and Webmentions are intentionally unaffected.
+
+ Use the configured retention period and leave verified or in-progress rows
+ untouched.
+
+ :returns: Number of expired terminal Webmentions removed.
"""
cutoff = datetime.now(UTC) - timedelta(
days=current_app.config["RECEIVED_RETENTION_DAYS"]