trigger on sliding window
This commit is contained in:
Родитель
30cd9624f2
Коммит
a403b57259
|
@ -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"
|
||||
|
|
|
@ -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<string> BlockingTask()
|
||||
{
|
||||
Task.Delay(TimeSpan.FromMinutes(10)).Wait();
|
||||
return TypedResults.Ok("succeeded");
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче