migrate routing command to use the models and store data there

This commit is contained in:
Viktor Barzin 2025-06-08 11:45:05 +00:00
parent 325823e631
commit 80c335ba04
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
6 changed files with 194 additions and 108 deletions

View file

@ -118,7 +118,6 @@ def listing_filter_options(func):
def cli(ctx, data_dir: str):
ctx.ensure_object(dict)
ctx.obj["data_dir"] = data_dir
pass
@cli.command()
@ -218,12 +217,14 @@ def routing(
"Please set it to your API key for the routing service."
)
repository = ListingRepository(engine=engine)
asyncio.run(
routing_module.calculate_route(
listing_paths,
repository,
destination_address,
# destination_address_coordinates,
TravelMode[travel_mode],
limit=limit,
)
)