Skip to content

Commit

Permalink
fixes progress logging in ena sync scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
SandyRogers committed Jan 15, 2024
1 parent d2c0a28 commit 4f2a203
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion emgena/management/commands/sync_assemblies_with_ena.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def handle(self, *args, **kwargs):
emg_assemblies_batch,
["is_private", "is_suppressed", "suppression_reason", "suppressed_at"],
)
logging.info(f"Batch {round(assemblies_count / batch_size)} processed.")
logging.info(f"Batch {round(offset / batch_size)} of {round(assemblies_count / batch_size)} processed.")
offset += batch_size

logging.info("Completed")
2 changes: 1 addition & 1 deletion emgena/management/commands/sync_runs_with_ena.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def handle(self, *args, **kwargs):
emg_runs_batch,
["is_private", "is_suppressed", "suppression_reason", "suppressed_at"],
)
logging.info(f"Batch {round(runs_count / batch_size)} processed.")
logging.info(f"Batch {round(offset / batch_size)} of {round(runs_count / batch_size)} processed.")
offset += batch_size

logging.info("Completed")
2 changes: 1 addition & 1 deletion emgena/management/commands/sync_samples_with_ena.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def handle(self, *args, **kwargs):
emg_samples_batch,
["is_private", "is_suppressed", "suppression_reason", "suppressed_at"],
)
logging.info(f"Batch {round(samples_count / batch_size)} processed.")
logging.info(f"Batch {round(offset / batch_size)} of {round(samples_count / batch_size)} processed.")
offset += batch_size

logging.info("Completed")
2 changes: 1 addition & 1 deletion emgena/management/commands/sync_studies_with_ena.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def handle(self, *args, **kwargs):
"public_release_date",
],
)
logging.info(f"Batch {round(studies_count / batch_size)} processed.")
logging.info(f"Batch {round(offset / batch_size)} of {round(studies_count / batch_size)} processed.")
offset += batch_size

logging.info("Completed")

0 comments on commit 4f2a203

Please sign in to comment.