convert listings dump to asyncio
This commit is contained in:
parent
df24c2c1b7
commit
ad879f2d4f
3 changed files with 35 additions and 34 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import asyncio
|
||||
import pathlib
|
||||
import click
|
||||
import importlib
|
||||
|
|
@ -107,12 +108,12 @@ def dump_listings(
|
|||
f'{query_parameters}'
|
||||
)
|
||||
data_dir_path = pathlib.Path(data_dir)
|
||||
dump_listings_module.dump_listings(query_parameters, data_dir_path)
|
||||
asyncio.run(dump_listings_module.dump_listings(query_parameters, data_dir_path))
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.pass_context
|
||||
def dump_detail(ctx: click.core.Context):
|
||||
def dump_details(ctx: click.core.Context):
|
||||
data_dir = ctx.obj['data_dir']
|
||||
click.echo(f'Running dump_detail for listings stored in {data_dir}')
|
||||
listing_paths = sorted(list(pathlib.Path(data_dir).glob("*/listing.json")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue