some cleanups
This commit is contained in:
parent
831c45e1f5
commit
289206afc0
8 changed files with 20 additions and 17 deletions
|
|
@ -5,7 +5,6 @@ from typing import Any
|
|||
from rec.query import detail_query, listing_query, QueryParameters
|
||||
from rec.districts import get_districts
|
||||
from repositories import ListingRepository
|
||||
from sqlalchemy import Engine
|
||||
from tqdm.asyncio import tqdm
|
||||
from data_access import Listing
|
||||
from models import Listing as modelListing
|
||||
|
|
@ -61,13 +60,13 @@ async def dump_listings(
|
|||
for listing in listings_without_details
|
||||
if listing.identifier not in all_listing_ids
|
||||
],
|
||||
desc="Fetching details",
|
||||
desc="Fetching details (only missing)",
|
||||
)
|
||||
for listing, detail in zip(listings_without_details, listing_details):
|
||||
listing._details_object = detail
|
||||
|
||||
model_listings = await repository.upsert_listings_legacy(listings) # upsert in db
|
||||
await dump_listings_to_fs(listings)
|
||||
model_listings = await repository.upsert_listings_legacy(listings) # upsert in db
|
||||
|
||||
return model_listings
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue