refactor dump listings to start using model instead of the data_access object

This commit is contained in:
Viktor Barzin 2025-06-07 12:46:53 +00:00
parent 842f7cefbe
commit 4f5a934fa9
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
5 changed files with 52 additions and 38 deletions

View file

@ -155,11 +155,10 @@ def dump_listings(
f"{query_parameters}"
)
data_dir_path = pathlib.Path(data_dir)
listings = asyncio.run(
dump_listings_module.dump_listings(query_parameters, engine, data_dir_path)
)
repository = ListingRepository(engine=engine)
asyncio.run(repository.upsert_listings(listings))
asyncio.run(
dump_listings_module.dump_listings(query_parameters, repository, data_dir_path)
)
@cli.command()