jonatanklosko / wca_statistics

Build kit for generating cubing-related rankings
https://jonatanklosko.github.io/wca_statistics
MIT License
18 stars 29 forks source link

Change 'Computed at' to time of DB export #11

Closed DanielEgdal closed 2 years ago

DanielEgdal commented 2 years ago

When you navigate to one of the statistics, the page mentions when the computation was done. However, this is not super useful when the developer DB doesn't update every time a computation is done. The developer update happens every ~3 days (I think), so instead the page should display the time of the latest DB export used. I found out sort of how to fix it, but I do not know ruby well enough to do a pull request for it. Here are my observations:

After getting the file here https://github.com/jonatanklosko/wca_statistics/blob/master/bin/update_database.rb#L18, run the unix command tail -1 wca-developer-database-dump.sql |grep -o '...................$' and save that. Change this line https://github.com/jonatanklosko/wca_statistics/blob/master/core/statistic.rb#L25 to use the output from above.

jonatanklosko commented 2 years ago

Hey @DanielEgdal! Good call, implemented it in 49618b7df8f8312f0103c1978c294e02a00b01b3 :)