From 30ff9b20a2b4aef83b91d8ce5cf102924d3a3452 Mon Sep 17 00:00:00 2001 From: Lucas Oskorep Date: Tue, 13 Sep 2022 17:20:07 -0400 Subject: [PATCH] fixing server not being updates post refactoring. --- server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index 38553a8..2a0787d 100644 --- a/server.py +++ b/server.py @@ -20,7 +20,7 @@ stop_ids = ["127S", "127N", "A27N", "A27S"] start_time = datetime.now().strftime("%d/%m/%Y %H:%M:%S") -def link_to_station(data): +def link_to_station(data) -> {}: linked_data = {} for key, value in data.items(): stop_name = stops.loc[stops["stop_id"] == key] @@ -84,9 +84,9 @@ if __name__ == "__main__": last_updated = datetime.now().strftime("%d/%m/%Y %H:%M:%S") - async def mta_callback(routes): + async def mta_callback(trains): global subway_data, old_data, last_updated - subway_data = link_to_station(mtaController.station_info_from_routes(routes)) + subway_data = link_to_station(mtaController.get_time_arriving_at_stations(trains)) subway_data["LastUpdated"] = last_updated if old_data is None: old_data = subway_data