Make message_queue::client::Client::send fallible

Allows tasks to report the errors themselves and handle retry in our
standardized way.
This commit is contained in:
Luke Parker
2025-01-11 21:57:58 -05:00
parent f501d46d44
commit d854807edd
4 changed files with 35 additions and 29 deletions

View File

@@ -146,8 +146,7 @@ impl<TD: DbTrait> ContinuallyRan for TributaryProcessorMessagesTask<TD> {
intent: msg.intent(),
};
let msg = borsh::to_vec(&msg).unwrap();
// TODO: Make this fallible
self.message_queue.queue(metadata, msg).await;
self.message_queue.queue(metadata, msg).await?;
txn.commit();
made_progress = true;
}