Skip to content

Commit

Permalink
Merge pull request #112 from plone/more-logs-migration
Browse files Browse the repository at this point in the history
More logs migration
  • Loading branch information
nilbacardit26 authored Jul 18, 2024
2 parents b9c918e + d50fa20 commit a910b06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
8.0.4 (unreleased)
------------------

- Nothing changed yet.
- Adding the reason of the error when migrating
[nilbacardit26]


8.0.3 (2024-04-10)
Expand Down
3 changes: 2 additions & 1 deletion guillotina_elasticsearch/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,8 @@ async def _index_batch(self, batch):
self.batch[_id] = batch[_id]
self.batch[_id]["action"] = "index"
else:
errors.append(f'{_id}: {value["status"]}')
reason = value.get("reason")
errors.append(f'{_id}: {value["status"]} {reason}')
if len(errors) > 0:
logger.warning(f"Error bulk putting: {errors}")

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"pytest-cov",
"pytest-docker-fixtures[pg]>=1.3.0",
"prometheus-client>=0.9.0", # TODO: remove
"docker>=6.0.0,<=6.1.3"
"docker>=7.1.0",
]


Expand Down

0 comments on commit a910b06

Please sign in to comment.