Skip to content

Commit 72075b9

Browse files
committed
Remove commented out code
1 parent f0e3752 commit 72075b9

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

src/ServiceControl.Audit/Auditing/AuditIngestion.cs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -228,20 +228,17 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
228228
// will only enter here if there is something to read.
229229
try
230230
{
231+
using var batchMetrics = metrics.BeginBatch(MaxBatchSize);
232+
231233
// as long as there is something to read this will fetch up to MaximumConcurrency items
232-
using (var batchMetrics = metrics.BeginBatch(MaxBatchSize))
234+
while (channel.Reader.TryRead(out var context))
233235
{
234-
while (channel.Reader.TryRead(out var context))
235-
{
236-
contexts.Add(context);
237-
}
238-
239-
await auditIngestor.Ingest(contexts);
240-
241-
batchMetrics.Complete(contexts.Count);
236+
contexts.Add(context);
242237
}
243238

244-
//metrics.ClearB .Record(0);
239+
await auditIngestor.Ingest(contexts);
240+
241+
batchMetrics.Complete(contexts.Count);
245242
}
246243
catch (Exception e)
247244
{
@@ -258,9 +255,6 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
258255
}
259256

260257
logger.Info("Ingesting messages failed", e);
261-
262-
// no need to do interlocked increment since this is running sequential
263-
//consecutiveBatchFailuresCounter.Record(consecutiveBatchFailures++);
264258
}
265259
finally
266260
{

0 commit comments

Comments
 (0)