Closed campos20 closed 2 years ago
I can handle this.
[x] Migration with a new table that include export_date and execution_date. Statistics table should also include export_date
[ ] Save export date in the control table
[ ] Statistics should look at the last export date in the control table and the date should go as a parameter to frontend
[ ] The front end needs to display this date in every page
As of today, we are including the date when the statistics were generated, which is not very useful. We could include the export date, which is more meaningful.
Details
This file is the one that runs in the cron
https://github.com/thewca/statistics/blob/main/scripts/cron.sh
This line downloads the export dump
https://github.com/thewca/statistics/blob/main/scripts/generate_all_statistics.sh#L8
Around here, we should include a line to save the export date
https://github.com/thewca/statistics/blob/main/scripts/get_db_export.sh#L65
The export we use is the "not so well known developer database export" here
https://github.com/thewca/worldcubeassociation.org/wiki/Developer-database-export
As an export date, we can use the last date in the Results table