Skip to content

Commit

Permalink
feat: Log errors in handle_streamer_message
Browse files Browse the repository at this point in the history
  • Loading branch information
morgsmccauley committed Aug 1, 2023
1 parent 1276ca8 commit 4f18727
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions indexer/queryapi_coordinator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ async fn main() -> anyhow::Result<()> {
})
.buffer_unordered(1usize);

while let Some(_handle_message) = handlers.next().await {}
while let Some(handle_message) = handlers.next().await {
if let Err(err) = handle_message {
tracing::error!(target: INDEXER, "{:#?}", err);
}
}
drop(handlers); // close the channel so the sender will stop

// propagate errors from the sender
Expand Down Expand Up @@ -208,7 +212,7 @@ async fn handle_streamer_message(
&format!("{}:stream", indexer_function.get_full_name()),
&[("block_height", block_height)],
)
.await?
.await?;
}

stream::iter(indexer_function_messages.into_iter())
Expand Down

0 comments on commit 4f18727

Please sign in to comment.