Skip to content

Commit

Permalink
Expose ability to retrieve a database connection publicly
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Jun 14, 2021
1 parent 66c4a0f commit ab6af15
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion osu.Server.QueueProcessor/QueueProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ public long GetQueueSize() =>

public void ClearQueue() => redis.GetDatabase().KeyDelete(inputQueueName);

protected MySqlConnection GetDatabaseConnection()
/// <summary>
/// Retrieve a database connection.
/// </summary>
public static MySqlConnection GetDatabaseConnection()
{
string host = (Environment.GetEnvironmentVariable("DB_HOST") ?? "localhost");
string user = (Environment.GetEnvironmentVariable("DB_USER") ?? "root");
Expand Down

0 comments on commit ab6af15

Please sign in to comment.