Skip to content

Commit

Permalink
Warn when batch not fully processed within a timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
vansha committed Jan 25, 2024
1 parent 4bd6121 commit a014e0a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion AzureBatchQueue/TimerBatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,17 @@ async Task DoFlush()
else
await Update();

async Task Update() => await batchQueue.UpdateMessage(msg.MessageId, Remaining());
async Task Update()
{
var remaining = Remaining();
await batchQueue.UpdateMessage(msg.MessageId, remaining);
logger.LogWarning("Message {msgId} was not fully processed within a timeout ({FlushPeriod}). {remainingCount} items left not completed from {totalCount} total",
FlushPeriod,
msg.MessageId,
remaining,
items.Items().Length);
}

async Task Delete() => await batchQueue.DeleteMessage(msg.MessageId);
async Task Quarantine()
{
Expand Down

0 comments on commit a014e0a

Please sign in to comment.