Skip to content

Commit

Permalink
Fix missing message
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzejkop committed Feb 28, 2024
1 parent eb24fee commit 6be9085
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/aws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ pub async fn sqs_dequeue(
Ok(messages)
}

#[tracing::instrument(skip(client, message))]
#[tracing::instrument(skip(client, payload))]
pub async fn sqs_enqueue<T>(
client: &aws_sdk_sqs::Client,
queue_url: &str,
message_group_id: &str,
message: T,
payload: T,
) -> eyre::Result<()>
where
T: Serialize + Debug,
{
let body = serde_json::to_string(&message)
let body = serde_json::to_string(&payload)
.wrap_err("Failed to serialize message")?;

let message_attributes = construct_message_attributes()?;
Expand All @@ -87,7 +87,7 @@ where
.send()
.await?;

tracing::info!(?send_message_output, ?message, "Enqueued message");
tracing::info!(?send_message_output, ?payload, "Enqueued message");

Ok(())
}
Expand Down

0 comments on commit 6be9085

Please sign in to comment.