jonatanklosko / wca_statistics

Build kit for generating cubing-related rankings

Home Page:https://jonatanklosko.github.io/wca_statistics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change 'Computed at' to time of DB export

DanielEgdal opened this issue · comments

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.

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