aarctan / schedubuddy-server

https://schedubuddy.com/
MIT License
4 stars 1 forks source link

Use Github API for Last Committed date instead #32

Closed httaq closed 12 months ago

httaq commented 12 months ago

Get a Commit This should allow querying the last updated date for both the frontend and the backend without storing it in the database.

aarctan commented 12 months ago

This might be misleading if we change the schema but don't actually update data. by storing in the db we can control the true date but still automate it. @Mattwmaster58 any thoughts?

httaq commented 12 months ago

Ah my bad I assumed the feature was for tracking every update to the site and not just the data.

aarctan commented 12 months ago

no worries I guess the caption can be a little more clear that it's the date last scraped

Mattwmaster58 commented 12 months ago

Kinda on topic ideally we keep track of the oldest cached file we've seen to give the most accurate "last updated" figure. Since that's requires some effort when using multiple processes to communicate between them, I instead use the lower bound for what last updated might be based on the cache TTL. So if TTL is 3 days and today is Nov 19, last updated will be set to Nov 16. So there is room for improvement there I just haven't got around to it.