Skip to content

Commit

Permalink
Continue even if it throws exception
Browse files Browse the repository at this point in the history
  • Loading branch information
moreal committed Oct 22, 2024
1 parent 5cac9df commit 761a31b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Mimir.Worker/Handler/BaseDiffHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)

while (!stoppingToken.IsCancellationRequested)
{
var diffContext = await ProduceByAccount(stoppingToken);
await ConsumeAsync(diffContext, stoppingToken);
try
{
var diffContext = await ProduceByAccount(stoppingToken);
await ConsumeAsync(diffContext, stoppingToken);
}
catch (Exception e)
{
Logger.Error(e, "Unexpected error occurred.");
}
}
}

Expand Down

0 comments on commit 761a31b

Please sign in to comment.