diff --git a/backend/src/main.py b/backend/src/main.py index a45e56f..7519d6d 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -135,6 +135,7 @@ def new_trip(preferences: Preferences, trip = Trip.from_linked_landmarks(linked_tour, cache_client) logger.info(f'Generated a trip of {trip.total_time} minutes with {len(refined_tour)} landmarks in {round(t_generate_landmarks + t_first_stage + t_second_stage,3)} seconds.') + BackgroundTasks(fill_cache()) return trip @@ -153,7 +154,6 @@ def get_trip(trip_uuid: str) -> Trip: """ try: trip = cache_client.get(f"trip_{trip_uuid}") - BackgroundTasks(fill_cache()) return trip except KeyError as exc: raise HTTPException(status_code=404, detail="Trip not found") from exc