Skip to content

Commit

Permalink
fix: or-2386 use cancelationtoken.none for initial adresmatch
Browse files Browse the repository at this point in the history
  • Loading branch information
emalfroy committed Aug 29, 2024
1 parent bfed94f commit 8ee62dd
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
using Marten;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Polly;
using Polly.Retry;
using Schema.Detail;

[ApiVersion("1.0")]
Expand Down Expand Up @@ -41,10 +39,9 @@ public async Task<IActionResult> QueueAdressenForAdresMatch(
{
try
{
await Policy
.Handle<System.Threading.Tasks.TaskCanceledException>()
.WaitAndRetryAsync(5, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)))
.ExecuteAsync(() => handler.Handle(message, cancellationToken));
await handler.Handle(message, CancellationToken.None);

logger.LogInformation($"Te adresmatchen vCode:{message.VCode} met locatie: {message.LocatieId} is succesvol verwerkt");

succeededMessages++;
}
Expand Down

0 comments on commit 8ee62dd

Please sign in to comment.