aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/retention.py
diff options
context:
space:
mode:
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"]