feat: extend RSS item retention from 14 to 90 days

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-28 00:29:32 -04:00
parent aa18f4f527
commit 57bf63e576
2 changed files with 88 additions and 2 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ logger = logging.getLogger(__name__)
CONTENT_MAX_CHARS = 2000
# Keep only items from the last N days to avoid unbounded growth
ITEM_MAX_AGE_DAYS = 14
ITEM_MAX_AGE_DAYS = 90
def extract_item(entry) -> dict:
@@ -135,7 +135,7 @@ async def _prune_old_items(feed_id: int) -> None:
text("""
DELETE FROM rss_items
WHERE feed_id = :feed_id
AND published_at < NOW() - INTERVAL '14 days'
AND published_at < NOW() - INTERVAL '90 days'
""").bindparams(feed_id=feed_id)
)
await session.commit()