Skip to content

Commit

Permalink
Fix formatter v2
Browse files Browse the repository at this point in the history
  • Loading branch information
emilioalvap committed Jun 12, 2024
1 parent 148cbd6 commit 818b997
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shippers/es.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
_EVENT_SENT = "_EVENT_SENT"
_VERSION_CONFLICT = 409


class JSONSerializer(Serializer):
mimetype = "application/json"

Expand Down Expand Up @@ -165,10 +166,10 @@ def _handle_outcome(self, errors: tuple[int, Union[int, list[Any]]]) -> None:
"elasticsearch shipper", extra={"error": error["create"]["error"], "_id": error["create"]["_id"]}
)

if "status" in error["create"] and error["create"]["status"] == _VERSION_CONFLICT:
if "status" in error["create"] and error["create"]["status"] == _VERSION_CONFLICT:
# Skip duplicate events on replay queue
continue

shared_logger.debug("elasticsearch shipper", extra={"action": action_failed[0]})
if self._replay_handler is not None:
self._replay_handler("elasticsearch", self._replay_args, action_failed[0])
Expand Down

0 comments on commit 818b997

Please sign in to comment.