Fix buy listing support: thread ListingType through processing pipeline

The listing processor was hardcoded to create RentListing objects and
query only the rentlisting table. Buy listings fetched from Rightmove
were stored in the wrong table with missing fields. This threads
ListingType through ListingProcessor and all Step subclasses so the
correct model (RentListing/BuyListing) is created, the correct table
is queried, and buy-specific fields (service_charge, lease_left) are
parsed from the API response and included in GeoJSON streaming output.
This commit is contained in:
Viktor Barzin 2026-02-07 23:34:08 +00:00
parent 5e48a26958
commit e5ce8c1201
No known key found for this signature in database
GPG key ID: 0EB088298288D958
6 changed files with 116 additions and 41 deletions

View file

@ -397,7 +397,7 @@ async def _dump_listings_full_inner(
},
)
listing_processor = ListingProcessor(repository)
listing_processor = ListingProcessor(repository, parameters.listing_type)
# Producer: fetch all subqueries concurrently, then signal workers to stop
async def producer() -> None: