Files
pgsql-jellyfin/Jellyfin.Server.Implementations/Events/Consumers/System/TaskCompletedNotifier.cs
T
wjones af1152b001 Refactor: standardize namespace and using directive style
Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
2026-02-20 16:26:53 -05:00

37 lines
1.3 KiB
C#

// <copyright file="TaskCompletedNotifier.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace Jellyfin.Server.Implementations.Events.Consumers.System
{
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Events;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Session;
using MediaBrowser.Model.Tasks;
/// <summary>
/// Notifies admin users when a task is completed.
/// </summary>
public class TaskCompletedNotifier : IEventConsumer<TaskCompletionEventArgs>
{
private readonly ISessionManager _sessionManager;
/// <summary>
/// Initializes a new instance of the <see cref="TaskCompletedNotifier"/> class.
/// </summary>
/// <param name="sessionManager">The session manager.</param>
public TaskCompletedNotifier(ISessionManager sessionManager)
{
_sessionManager = sessionManager;
}
/// <inheritdoc />
public async Task OnEvent(TaskCompletionEventArgs eventArgs)
{
await _sessionManager.SendMessageToAdminSessions(SessionMessageType.ScheduledTaskEnded, eventArgs.Result, CancellationToken.None).ConfigureAwait(false);
}
}
}