Files
jellyfin-ha-src/MediaBrowser.Controller/Session/NullPodMessageBus.cs
T
unkin-agent 00d0765152
ci/woodpecker/pr/ci Pipeline failed
ci/woodpecker/push/ci Pipeline failed
feat(session): share the session directory between instances
Publish every session to valkey with the instance holding it, and route a
command for a non-local session to its owner over a per-instance pub/sub
channel. Entries expire, so a dead instance leaves the directory.
2026-09-24 22:48:48 +10:00

29 lines
684 B
C#

using System;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Session;
/// <summary>
/// The single-instance <see cref="IPodMessageBus"/>: there is no other instance to reach.
/// </summary>
public sealed class NullPodMessageBus : IPodMessageBus
{
/// <summary>
/// Gets the shared instance.
/// </summary>
public static NullPodMessageBus Instance { get; } = new NullPodMessageBus();
/// <inheritdoc />
public string PodId => PodIdentity.Current;
/// <inheritdoc />
public void Publish(string targetPod, PodMessage message)
{
}
/// <inheritdoc />
public void Subscribe(Func<PodMessage, Task> handler)
{
}
}