INNER CODE UNIT · Python
_list_imgs
pluralsh/plural · bin/list_images.py:148
async def _list_imgs():
with Path('./.deleted-imgs').open('a') as f:
async with DockerRegistryClientAsync(credentials_store=Path("./config.json")) as dkr_client:
api = gql_client()
repos = api.execute(query=repos_q)['data']['repositories']['edges']
for i in range(0, len(repos), STEP):
await asyncio.wait([find_images_for_repo(dkr_client, repo['node'], f) for repo in repos[i:i+STEP]])
@click.command()
def list_imgs():
asyncio.run(_list_imgs())
if __name__ == '__main__':
signal.signal(signal.SIGINT, flush_seen)
signal.signal(signal.SIGTERM, flush_seen)
read_seen()
list_imgs()