diff --git a/deploy/Services/api.deployment.json b/deploy/Services/api.deployment.json index f2a9bc1..d45388c 100644 --- a/deploy/Services/api.deployment.json +++ b/deploy/Services/api.deployment.json @@ -312,6 +312,10 @@ "name" : "DotnetMonitor_CollectionRules__ThreadBlock__Trigger__Settings__GreaterThan", "value": "10" }, + { + "name" : "DotnetMonitor_CollectionRules__ThreadBlock__Trigger__Settings__SlidingWindowDuration", + "value": "00:00:10" + }, { "name" : "DotnetMonitor_CollectionRules__ThreadBlock__Actions__0__Type", "value": "CollectDump" diff --git a/src/Services/Podcasts/Podcast.MinimalAPI/Routes/BlockingApi.cs b/src/Services/Podcasts/Podcast.MinimalAPI/Routes/BlockingApi.cs new file mode 100644 index 0000000..71f001b --- /dev/null +++ b/src/Services/Podcasts/Podcast.MinimalAPI/Routes/BlockingApi.cs @@ -0,0 +1,22 @@ +using Microsoft.AspNetCore.Http.HttpResults; +using Microsoft.EntityFrameworkCore; +using Podcast.API.Models; +using Podcast.Infrastructure.Data; +using System.Threading; + +namespace Podcast.API.Routes; + +public static class BlockingApi +{ + public static RouteGroupBuilder MapBlockingApi(this RouteGroupBuilder group) + { + group.MapGet("/", BlockingTask); + return group; + } + + public static Ok BlockingTask() + { + Task.Delay(TimeSpan.FromMinutes(10)).Wait(); + return TypedResults.Ok("succeeded"); + } +}