Commit c90533d
committed
Refactor Reddit and Mee6 migration logic
Extract reusable helpers and simplify migration flows for Reddit and Mee6 imports. Added _process_reddit_item and _update_reddit_rank_database to centralize author handling, XP aggregation, DB upsert logic and progress logging; this reduces duplication and improves error handling. For Mee6, added _fetch_mee6_page (with timeout/error handling) and _process_mee6_batch, and changed the migration to fetch pages and apply updates in batches, reducing DB churn. Also updated final stats to use derived counts and restored original Git state before final sync. Overall aims: clearer structure, fewer nested try/except blocks, better logging, and more efficient DB writes.1 parent 49cac23 commit c90533d
1 file changed
Lines changed: 277 additions & 193 deletions
0 commit comments