Skip to content

Commit

Permalink
Merge pull request #3616 from unicef/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
robertavram authored Dec 22, 2023
2 parents 4d3dec4 + 9fed295 commit 5770049
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/etools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION = __version__ = '11.1.6'
VERSION = __version__ = '11.1.7'
NAME = 'eTools'
3 changes: 2 additions & 1 deletion src/etools/applications/locations/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def create_or_update_locations(self, batch_size=500):
new, updated, skipped, error = 0, 0, 0, 0
logging.info(f'Total Rows {len(rows)}')
logging.info(f'Batch size {batch_size}')
for idx, batch in enumerate(zip(*[iter(rows)] * batch_size)):
for idx in range(0, len(rows), batch_size):
batch = rows[idx:idx + batch_size]
logging.info(f'processing batch {idx+1}')
batch = list(batch)
indexed_batch = {item[self.carto.pcode_col]: item for item in batch}
Expand Down

0 comments on commit 5770049

Please sign in to comment.