Skip to content
Snippets Groups Projects
Commit 85ce009b authored by Sven-Ove Hänsel's avatar Sven-Ove Hänsel
Browse files

add index to identify inserted batches

parent a04f0ac0
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,12 @@ if __name__ == "__main__": ...@@ -129,7 +129,12 @@ if __name__ == "__main__":
uuid_edges = len(getenv("UUID_EDGES", "")) > 0 uuid_edges = len(getenv("UUID_EDGES", "")) > 0
with psycopg.connect() as connection: with psycopg.connect() as connection:
total_batches = len(list(read_zip(file, batch_size)))
info(f"Total batches to process: {total_batches}")
batch_count = 0
for batch in read_zip(file, batch_size): for batch in read_zip(file, batch_size):
print(f"Processing batch number {batch_count + 1} of {total_batches}")
batch_count += 1
if interrupted: if interrupted:
break break
batch_iter = (line.replace(HEADER_SCHEMA, b"") for line in batch) batch_iter = (line.replace(HEADER_SCHEMA, b"") for line in batch)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment