refactor dump listings to start using model instead of the data_access object
This commit is contained in:
parent
842f7cefbe
commit
4f5a934fa9
5 changed files with 52 additions and 38 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue