diff --git a/osu.Server.QueueProcessor/RedisAccess.cs b/osu.Server.QueueProcessor/RedisAccess.cs index 9e7a226..cc36312 100644 --- a/osu.Server.QueueProcessor/RedisAccess.cs +++ b/osu.Server.QueueProcessor/RedisAccess.cs @@ -11,10 +11,11 @@ namespace osu.Server.QueueProcessor /// public static class RedisAccess { + private static readonly ConfigurationOptions redis_config = ConfigurationOptions.Parse(Environment.GetEnvironmentVariable("REDIS_HOST") ?? "localhost"); + /// /// Retrieve a fresh Redis connection. Should be disposed after use. /// - public static ConnectionMultiplexer GetConnection() => - ConnectionMultiplexer.Connect(Environment.GetEnvironmentVariable("REDIS_HOST") ?? "localhost"); + public static ConnectionMultiplexer GetConnection() => ConnectionMultiplexer.Connect(redis_config); } }