Skip to content

Commit

Permalink
Make HealthCheckNotifierJob Contructor Obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjanwestendorp committed Nov 22, 2023
1 parent e46dd73 commit 7645e95
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.HealthChecks;
using Umbraco.Cms.Core.HealthChecks.NotificationMethods;
Expand Down Expand Up @@ -44,6 +46,26 @@ public event EventHandler PeriodChanged
private readonly ICoreScopeProvider _scopeProvider;
private HealthChecksSettings _healthChecksSettings;

[Obsolete("Use constructor that accepts IEventAggregator as a parameter, scheduled for removal in V14")]
public HealthCheckNotifierJob(
IOptionsMonitor<HealthChecksSettings> healthChecksSettings,
HealthCheckCollection healthChecks,
HealthCheckNotificationMethodCollection notifications,
ICoreScopeProvider scopeProvider,
ILogger<HealthCheckNotifierJob> logger,
IProfilingLogger profilingLogger,
ICronTabParser cronTabParser)
: this(
healthChecksSettings,
healthChecks,
notifications,
scopeProvider,
logger,
profilingLogger,
cronTabParser,
StaticServiceProvider.Instance.GetRequiredService<IEventAggregator>())
{ }

/// <summary>
/// Initializes a new instance of the <see cref="HealthCheckNotifierJob" /> class.
/// </summary>
Expand Down

0 comments on commit 7645e95

Please sign in to comment.