I swapped 'data' and 'updated' elements of json responses. This is needed so that mta.last_update() picks up the most recent update time which happens in the 'data' functions (eg, get_by_id(), get_routes()). When running in non-threaded mode, I noticed that the "updated" time would be really old when there is a long gap between requests. It's because it was picking up the updated time from the previous request since the new response sends the last_update() time before it fetches anything new and updates _last_update. By swapping them, it will have the most up-to-date _last_update time.
I swapped 'data' and 'updated' elements of json responses. This is needed so that mta.last_update() picks up the most recent update time which happens in the 'data' functions (eg, get_by_id(), get_routes()). When running in non-threaded mode, I noticed that the "updated" time would be really old when there is a long gap between requests. It's because it was picking up the updated time from the previous request since the new response sends the last_update() time before it fetches anything new and updates _last_update. By swapping them, it will have the most up-to-date _last_update time.