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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user