Skip to content

Commit

Permalink
Better tracking on progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Feb 19, 2025
1 parent a016a90 commit 2d094b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions synapseclient/models/mixins/table_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,6 @@ async def main():
desc="Querying & Updating rows",
unit_scale=True,
smoothing=0,
postfix=f"Over {len(chunk_list)} chunks",
)
for individual_chunk in chunk_list:
select_statement = "SELECT ROW_ID, "
Expand Down Expand Up @@ -2122,6 +2121,7 @@ async def main():
)

await request.send_job_and_wait_async(synapse_client=client)
progress_bar.update(len(chunk))
chunk = []
current_chunk_size = 0
chunk.append(row)
Expand All @@ -2140,9 +2140,11 @@ async def main():
entity_id=self.id,
changes=[change],
).send_job_and_wait_async(synapse_client=client)
progress_bar.update(len(chunk))
elif dry_run:
progress_bar.update(len(rows_to_update))

rows_to_update: List[PartialRow] = []
progress_bar.update(len(individual_chunk))
progress_bar.close()

rows_to_insert_df = values.loc[
Expand Down

0 comments on commit 2d094b2

Please sign in to comment.