-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHealthHttpServerService.cs
More file actions
29 lines (26 loc) · 1015 Bytes
/
HealthHttpServerService.cs
File metadata and controls
29 lines (26 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace RunCommandsService
{
/// <summary>
/// Backward-compatible no-op service. The real HTTP endpoint is served by Monitoring.
/// This class exists only to satisfy older Program.cs registrations.
/// </summary>
public class HealthHttpServerService : IHostedService
{
private readonly ILogger<HealthHttpServerService> _logger;
public HealthHttpServerService(ILogger<HealthHttpServerService> logger) { _logger = logger; }
public Task StartAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("HealthHttpServerService (noop) started");
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("HealthHttpServerService (noop) stopped");
return Task.CompletedTask;
}
}
}