odota / core

Open source Dota 2 data platform
https://www.opendota.com
MIT License
1.51k stars 303 forks source link

add service to backfill pro matches #1675

Open howardchung opened 6 years ago

howardchung commented 6 years ago

Currently, Valve sometimes doesn't add a league ID to the list of leagues until after the event starts, so we miss some of the first matches played.

I wrote a script that iterates over the list of league IDs and can find the match IDs of the matches played and re-inserts them.

https://github.com/odota/core/blob/master/dev/findProMatches.js

We could turn this into a service that runs on a loop.

builder-247 commented 4 years ago

I could work on this. I assume the commented part can be removed? 24 hours is probably a good interval.

howardchung commented 4 years ago

Yeah. It could also probably benefit from being rewritten to use async/await.

24 hours works, but the services are rebooted automatically at least once every 24 hours anyway, so even if you set a longer timeout it might run at least that often.