using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.Logging; namespace Cleanuparr.Infrastructure.Health; /// /// SignalR hub for broadcasting health status updates /// public class HealthStatusHub : Hub { private readonly ILogger _logger; /// /// Initializes a new instance of the class /// /// The logger public HealthStatusHub(ILogger logger) { _logger = logger; } /// /// Called when a client connects to the hub /// public override async Task OnConnectedAsync() { _logger.LogInformation("Client connected: {connectionId}", Context.ConnectionId); await base.OnConnectedAsync(); } /// /// Called when a client disconnects from the hub /// public override async Task OnDisconnectedAsync(Exception? exception) { _logger.LogInformation("Client disconnected: {connectionId}", Context.ConnectionId); await base.OnDisconnectedAsync(exception); } }