Skip to content

fix: reduce stats workload#325

Merged
ohld merged 1 commit into
productionfrom
codex/perf-stats-hotfix
Jun 26, 2026
Merged

fix: reduce stats workload#325
ohld merged 1 commit into
productionfrom
codex/perf-stats-hotfix

Conversation

@ohld

@ohld ohld commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • add targeted indexes for the high-cost user_meme_reaction stats paths
  • make meme stats use indexable recent-reaction predicates and avoid recent scans for targeted meme recalculation
  • reduce scheduled stats pressure and stop upload approvals from launching full source/stats recomputes
  • cap default Gunicorn workers and skip Prefect event emission when app workers have no PREFECT_API_URL
  • limit VK pagination to the requested post count

Validation

  • ruff check touched files
  • ruff format --check touched files
  • py_compile touched files
  • pytest tests/stats/test_meme.py tests/stats/test_engagement_score.py tests/stats/test_batch_stats.py -q
  • pytest tests/tgbot/test_upload_moderation.py tests/tgbot/test_upload_observability.py -q

@ohld ohld merged commit e84a12d into production Jun 26, 2026
3 checks passed
@ohld ohld deleted the codex/perf-stats-hotfix branch June 26, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant