Skip to content

Commit

Permalink
Merge pull request #35 from smoogipoo/fix-redis-connection-delay
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy authored Nov 1, 2024
2 parents 001e033 + 25feed1 commit e26c865
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions osu.Server.QueueProcessor/RedisAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ namespace osu.Server.QueueProcessor
/// </summary>
public static class RedisAccess
{
private static readonly ConfigurationOptions redis_config = ConfigurationOptions.Parse(Environment.GetEnvironmentVariable("REDIS_HOST") ?? "localhost");

/// <summary>
/// Retrieve a fresh Redis connection. Should be disposed after use.
/// </summary>
public static ConnectionMultiplexer GetConnection() =>
ConnectionMultiplexer.Connect(Environment.GetEnvironmentVariable("REDIS_HOST") ?? "localhost");
public static ConnectionMultiplexer GetConnection() => ConnectionMultiplexer.Connect(redis_config);
}
}

0 comments on commit e26c865

Please sign in to comment.