PLAT-2804

Made the kpis_update_script and the plausible_script automated.

Created two separated Celery tasks for each script to be run at the end of each month and the result to be displayed using custom logging.

More info in scripts/README.rst

Sample output testing locally:

docker compose run --rm monthly_reports_e2e scripts/kpis_update_script.py 2026-05 --mode monthly
INFO:kpis_update_script: [2026-07-06 16:46:27] Starting monthly processing for 2026-05
...
INFO:kpis_update_script: BOOKS: 12615
INFO:kpis_update_script: PUBLISHERS: 73

Files Changed

  • Dockerfile
  • config/requirements.txt
  • config/supervisord-workers.conf
  • docker-compose.yml
  • scripts/README.rst
  • scripts/kpis_update_script.py
  • scripts/plausible_script.py
  • scripts/tests/e2e_test_monthly_reports.py
  • scripts/tests/test_kpis_update_script.py
  • scripts/tests/test_plausible_script.py
  • setup/metrics_db/Dockerfile
  • src/tasks/monthly_reports.py
  • src/tasks/config.py
  • src/tasks/tests/test_monthly_reports.py
  • src/tasks/tests/test_beat_schedule.py

MR for the Kubernetes values:

Edited by Cristian Garcia

Merge request reports

Loading
Loading