mapswipe / python-mapswipe-workers

MapSwipe Back-End
https://mapswipe-workers.readthedocs.io
Apache License 2.0
26 stars 10 forks source link

Prod Deployment - Community Dashboard data calculation update #871

Closed thenav56 closed 1 year ago

thenav56 commented 1 year ago

NOTE: Don't delete Dev branch

After Deployment

Remove/Update POSTGRES_HOST from .env if using postgres defined within docker-compose.yaml - DONE

- POSTGRES_HOST=localhost

Stop all the containers (Except the database) - DONE

docker compose stop
docker compose start postgres

Run SQL migration script - DONE

postgres/scripts/v2_to_v3/06_alter_groups_data_add_total_area_and_time_limit_columns.sql

Deploy new containers + Stop django-schedule-task - DONE

make deploy_latest_workers_version
docker compose stop django-schedule-task

Run project groups data calculation (Runtime: 5-6 hours for Database with 8CPU 16GB VM) - DONE - Runtime: 2.6 Hours

time docker compose run --rm django ./manage.py update_project_groups_data

Reset aggregated tracking point - DONE

TRUNCATE TABLE aggregated_aggregatedtracking;

Run aggregated data calculation (Runtime: 13-15 min for Database with 8CPU 16GB VM) - DONE - Runtime: 18 minutes

time docker compose run --rm django ./manage.py update_aggregated_data

This PR Includes