Skip to content

Commit 5e9166b

Browse files
The most significant changes involve the modification of the AddKenticoHealthChecks method signature and the increase in delay for the HealthCheckPublisherOptions. The AddKenticoHealthChecks method now has a default value of false for the useEventLogPublisher parameter, which means it will default to false if no argument is provided. The delay for the HealthCheckPublisherOptions has been increased from 2 seconds to 15 seconds, causing the health check to wait longer before publishing its results.
Changes: 1. The `AddKenticoHealthChecks` method signature has been modified to provide a default value of `false` for the `useEventLogPublisher` parameter. This means that if no argument is provided for this parameter when the method is called, it will default to `false`. (Refer to the changes in the `AddKenticoHealthChecks` method in the code) 2. The delay for the `HealthCheckPublisherOptions` has been increased from 2 seconds to 15 seconds. This means that the health check will now wait for 15 seconds before publishing its results. (Refer to the changes in the `HealthCheckPublisherOptions` settings in the code)
1 parent 4a5471c commit 5e9166b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/XperienceCommunity.AspNetCore.HealthChecks/DependencyInjection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ public static class DependencyInjection
1919
/// <param name="services">The <see cref="IServiceCollection"/> to add the health checks to.</param>
2020
/// <param name="useEventLogPublisher">Optionally Use the Event Log Publisher.</param>
2121
/// <returns>The <see cref="IHealthChecksBuilder"/> instance.</returns>
22-
public static IHealthChecksBuilder AddKenticoHealthChecks(this IServiceCollection services, bool useEventLogPublisher)
22+
public static IHealthChecksBuilder AddKenticoHealthChecks(this IServiceCollection services, bool useEventLogPublisher = false)
2323
{
2424
if (useEventLogPublisher)
2525
{
2626
services.Configure<HealthCheckPublisherOptions>(options =>
2727
{
28-
options.Delay = TimeSpan.FromSeconds(2);
28+
options.Delay = TimeSpan.FromSeconds(15);
2929
options.Predicate = healthCheck => healthCheck.Tags.Contains(Kentico);
3030
});
3131

0 commit comments

Comments
 (0)