migrate processing to a pipeline approach where each listing is processed in a pipeline in parallel and status reported back to track progress
This commit is contained in:
parent
4fa09e31c8
commit
91a0436f7f
6 changed files with 347 additions and 26 deletions
|
|
@ -27,7 +27,7 @@ async def dump_images(
|
|||
|
||||
@retry(wait=wait_random(min=1, max=2), stop=stop_after_attempt(3))
|
||||
async def dump_images_for_listing(listing: Listing, base_path: Path) -> Listing | None:
|
||||
all_floorplans = listing.additional_info["property"]["floorplans"]
|
||||
all_floorplans = listing.additional_info.get("property", {}).get("floorplans", [])
|
||||
for floorplan in all_floorplans:
|
||||
url = floorplan["url"]
|
||||
picname = url.split("/")[-1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue