Commit graph

3 commits

Author SHA1 Message Date
Viktor Barzin
e431eaf2aa
Fix POI distance calculation for buy listings
The distance calculator always queried the rentlisting table regardless of
listing type because get_listings() defaulted to RentListing when called
without query_parameters. Added a listing_type parameter to get_listings()
and _get_model_for_query() so callers can select the correct table directly.
2026-02-08 19:10:32 +00:00
Viktor Barzin
8a5d1b3787
Fix POI distance calculation: OSRM index separator and error handling
- Fix OSRM client to use semicolons (not commas) for source/destination
  indices in /table API requests. Commas caused "Query string malformed"
  errors for any batch with more than one origin.
- Add error handling in poi_distance_calculator for unreachable routing
  engines (OSRM/OTP). Connection failures now log an error and skip the
  mode instead of crashing the entire Celery task.
2026-02-08 14:50:09 +00:00
Viktor Barzin
da0a56895d
Add self-hosted routing clients and distance calculator
RoutingConfig loads OSRM/OTP URLs from env vars. OSRM client uses the
/table endpoint for batch NxM distance matrices (walk/cycle). OTP client
uses GraphQL API for transit routes. POI distance calculator orchestrates
both, skipping already-computed distances and reporting progress.
2026-02-08 13:14:37 +00:00