00d0765152
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.
15 lines
403 B
C#
15 lines
403 B
C#
using System;
|
|
|
|
namespace MediaBrowser.Controller.Session;
|
|
|
|
/// <summary>
|
|
/// The identity of this instance among the replicas sharing a deployment.
|
|
/// </summary>
|
|
public static class PodIdentity
|
|
{
|
|
/// <summary>
|
|
/// Gets the identity of this instance.
|
|
/// </summary>
|
|
public static string Current => Environment.GetEnvironmentVariable("JELLYFIN_INSTANCE_ID") ?? Environment.MachineName;
|
|
}
|