healthchecks
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using back.ServicesExtensions;
|
||||
using healthchecks;
|
||||
|
||||
namespace back;
|
||||
|
||||
@@ -11,6 +12,13 @@ public class Program
|
||||
builder.Services.UseExtensions();
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
builder.Services.AddHealthChecks(options => {
|
||||
options.CacheDuration = TimeSpan.FromMinutes(30);
|
||||
options.Timeout = TimeSpan.FromSeconds(5);
|
||||
options.AssembliesToScan = [typeof(Program).Assembly];
|
||||
}).DiscoverHealthChecks();
|
||||
|
||||
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
|
Reference in New Issue
Block a user