a digital person for bluesky

Add 1-month age filter to skip old notifications

- Import timedelta for date calculations
- Skip notifications older than 30 days from current time
- Prevents processing very old backlog items
- Still respects last_processed_time for recent items

🐾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

+12 -2
+12 -2
bsky.py
··· 8 8 import hashlib 9 9 import subprocess 10 10 from pathlib import Path 11 - from datetime import datetime 11 + from datetime import datetime, timedelta 12 12 from collections import defaultdict 13 13 import time 14 14 import argparse ··· 1419 1419 processed_uris = load_processed_notifications() 1420 1420 1421 1421 # Queue all new notifications (except likes) 1422 + # Calculate cutoff time: 1 month ago from now 1423 + one_month_ago = (datetime.now() - timedelta(days=30)).isoformat() 1424 + 1422 1425 for notif in all_notifications: 1423 - # Skip if older than last processed (when we have timestamp filtering) 1426 + # Skip if older than 1 month 1427 + if hasattr(notif, 'indexed_at'): 1428 + if notif.indexed_at < one_month_ago: 1429 + skipped_old_timestamp += 1 1430 + logger.debug(f"Skipping old notification (older than 1 month): {notif.indexed_at}") 1431 + continue 1432 + 1433 + # Also skip if older than last processed (when we have timestamp filtering) 1424 1434 if last_processed_time and hasattr(notif, 'indexed_at'): 1425 1435 if notif.indexed_at <= last_processed_time: 1426 1436 skipped_old_timestamp += 1