some cleanups

This commit is contained in:
Viktor Barzin 2025-06-08 20:58:28 +00:00
parent 831c45e1f5
commit 289206afc0
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
8 changed files with 20 additions and 17 deletions

View file

@ -44,9 +44,9 @@ def listing_filter_options(func):
)
@click.option(
"--max-bedrooms",
default=5,
default=10,
help="Maximum number of bedrooms",
type=click.IntRange(min=1),
type=click.IntRange(min=1, max=10), # Right move gets unhappy with >10
)
@click.option(
"--min-price",
@ -56,9 +56,9 @@ def listing_filter_options(func):
)
@click.option(
"--max-price",
default=1000000,
default=999_999,
help="Maximum price",
type=click.IntRange(min=0),
type=click.IntRange(min=0, max=40_000), # 40k for renting
)
@click.option(
"--district",
@ -359,7 +359,7 @@ def populate_db(
listings = Listing.get_all_listings(
[path for path in pathlib.Path(data_dir).glob("*/listing.json")]
)
asyncio.run(repository.upsert_listings(listings))
asyncio.run(repository.upsert_listings_legacy(listings))
if __name__ == "__main__":