transitmatters / new-train-tracker

Tracking the MBTA's new Orange, Red, and Green trains
http://traintracker.transitmatters.org/
MIT License
33 stars 11 forks source link

Reduce looped calls to v3 API #202

Closed devinmatte closed 5 months ago

devinmatte commented 5 months ago

https://github.com/devinmatte/new-train-tracker/blob/02dda824e5ac7e6c6fa578752df770a95636135d/server/mbta_api.py#L116-L128

This code is calling the v3 MBTA api X times and blocking return until response on all X calls

Instead we should have a separate API call that get called when the vehicle is selected in the frontend to return the extra info

rudiejd commented 5 months ago

done in https://github.com/transitmatters/new-train-tracker/commit/c56432139ba2f32e17a2b81e4661eff771172219