Skip to content

Commit

Permalink
updated logic to handle unexpected dbsync payload
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKitsune committed Feb 28, 2024
1 parent 24ab7b4 commit d9202c2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/coordinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,14 @@ impl Coordinator {
items
} else {
tracing::error!(?receipt_handle, "Failed to parse message body");

sqs_delete_message(
&self.sqs_client,
&self.config.queues.db_sync_queue_url,
receipt_handle,
)
.await?;

return Ok(());
};

Expand Down
8 changes: 8 additions & 0 deletions src/participant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ impl Participant {
items
} else {
tracing::error!(?receipt_handle, "Failed to parse message body");

sqs_delete_message(
&self.sqs_client,
&self.config.queues.db_sync_queue_url,
receipt_handle,
)
.await?;

return Ok(());
};

Expand Down

0 comments on commit d9202c2

Please sign in to comment.