Skip to content

Commit

Permalink
Merge pull request #65 from NASA-PDS/zero-count-bulk-update-hotfix
Browse files Browse the repository at this point in the history
hotfix zero-update writes regression
  • Loading branch information
alexdunnjpl authored Aug 31, 2023
2 parents 2c13800 + 8dcd50b commit 356fa3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pds/registrysweepers/utils/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@ def write_updated_docs(host: Host, updates: Iterable[Update], index_name: str =
remaining_products_to_write_count = int(len(bulk_updates_buffer) / 2)
updated_doc_count += remaining_products_to_write_count

log.info(f"Writing documents updates for {remaining_products_to_write_count} remaining products to db...")
_write_bulk_updates_chunk(host, index_name, bulk_updates_buffer)
if len(bulk_updates_buffer) > 0:
log.info(f"Writing documents updates for {remaining_products_to_write_count} remaining products to db...")
_write_bulk_updates_chunk(host, index_name, bulk_updates_buffer)

log.info(f"Updated documents for {updated_doc_count} total products!")

Expand Down

0 comments on commit 356fa3d

Please sign in to comment.