migrate dump images command to use model listings
This commit is contained in:
parent
4f5a934fa9
commit
ba87d07cd2
6 changed files with 99 additions and 20 deletions
|
|
@ -166,8 +166,8 @@ def dump_listings(
|
|||
def dump_images(ctx: click.core.Context):
|
||||
data_dir = ctx.obj["data_dir"]
|
||||
click.echo(f"Running dump_images stored in {data_dir}")
|
||||
listing_paths = sorted(list(pathlib.Path(data_dir).glob("*/listing.json")))
|
||||
asyncio.run(dump_images_module.dump_images(listing_paths))
|
||||
repository = ListingRepository(engine=engine)
|
||||
asyncio.run(dump_images_module.dump_images(repository, image_base_path=data_dir))
|
||||
|
||||
|
||||
@cli.command()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue