Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalSenn committed Jun 12, 2024
1 parent f1fa2ed commit d61b380
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@ private async Task HandleMessage(NpgsqlConnection connection, CancellationToken
}
catch (Exception ex)
{
var msg = string.Format(ChannelWriter_FailedToSend, messages.Count, ex.ToString());
var msg = string.Format(ChannelWriter_FailedToSend, messages.Count, ex.Message);
_diagnosticEvents.ProviderInfo(msg);

// if we cannot send the message we put it back into the channel
// however as the channel is bounded, we might not able to requeue the message and will be forced to drop them if they can't be written
// however as the channel is bounded, we might not able to requeue the message and will
// be forced to drop them if they can't be written
var failedCount = 0;

foreach (var message in messages)
Expand All @@ -149,7 +150,8 @@ private async Task HandleMessage(NpgsqlConnection connection, CancellationToken

if (failedCount > 0)
{
_diagnosticEvents.ProviderInfo(string.Format(ChannelWriter_FailedToRequeueMessage, failedCount));
_diagnosticEvents.ProviderInfo(
string.Format(ChannelWriter_FailedToRequeueMessage, failedCount));
}
}
}
Expand Down

0 comments on commit d61b380

Please sign in to comment.