SUPERCILEX / Robot-Scouter

:robot: Easy, efficient, and collaborative FIRST robot scouting
https://bit.ly/RobotScouter
GNU General Public License v3.0
107 stars 41 forks source link

Move TBA team syncing to server #291

Closed SUPERCILEX closed 4 years ago

SUPERCILEX commented 4 years ago

Syncing was originally done on the client because cloud functions didn't exist. When functions launched, I didn't consider moving the logic because I thought it would be too expensive. Upon further consideration, it would probably be cheaper to do syncing on the server for a number of reasons:

Furthermore, this is better for the client since there won't be wasted bandwidth and app wake-ups.

From an implementation perspective, we query all the teams that haven't been updated in X days and then sync them with TBA. We also add a function that listens to team changes and syncs the team immediately if it's out-of-date.

SUPERCILEX commented 4 years ago

Fixed by 76168ee, 8ceb55e, and c38bc9d.