redis 버그 수정
This commit is contained in:
parent
72c491b216
commit
2a04631b5e
|
|
@ -15,7 +15,7 @@ namespace Server.System
|
||||||
Dictionary<string, List<string>> listType;
|
Dictionary<string, List<string>> listType;
|
||||||
Dictionary<string, List<Rank>> zType;
|
Dictionary<string, List<Rank>> zType;
|
||||||
Dictionary<string, Dictionary<string, string>> hashType;
|
Dictionary<string, Dictionary<string, string>> hashType;
|
||||||
public Redis(string host = "127.0.0.1", int port = 6379, int db = 0)
|
public Redis(string host = "127.0.0.1", int port = 6379, int db = 0, string password = "")
|
||||||
{
|
{
|
||||||
if (host == "localhost")
|
if (host == "localhost")
|
||||||
{
|
{
|
||||||
|
|
@ -27,9 +27,24 @@ namespace Server.System
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (password.Equals(string.Empty))
|
||||||
|
{
|
||||||
|
Console.WriteLine("true");
|
||||||
redis = ConnectionMultiplexer.Connect($"{host}:{port}");
|
redis = ConnectionMultiplexer.Connect($"{host}:{port}");
|
||||||
this.db = redis.GetDatabase(db);
|
this.db = redis.GetDatabase(db);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("true");
|
||||||
|
ConfigurationOptions options = new ConfigurationOptions
|
||||||
|
{
|
||||||
|
EndPoints = { $"{host}:{port}" },
|
||||||
|
Password = password
|
||||||
|
};
|
||||||
|
redis = ConnectionMultiplexer.Connect(options);
|
||||||
|
this.db = redis.GetDatabase(db);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void test()
|
public void test()
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,12 @@ namespace Server.System
|
||||||
public static readonly string SQL_URL = "Host=192.168.0.2;Port=5432;Username=manager;Password=Zn2zs558W5SdD8K;Database=project_thewar;";
|
public static readonly string SQL_URL = "Host=192.168.0.2;Port=5432;Username=manager;Password=Zn2zs558W5SdD8K;Database=project_thewar;";
|
||||||
public static readonly string EXCEL_SQL_URL = "Host=192.168.0.2;Port=5432;Username=manager;Password=Zn2zs558W5SdD8K;Database=project_thewar;";
|
public static readonly string EXCEL_SQL_URL = "Host=192.168.0.2;Port=5432;Username=manager;Password=Zn2zs558W5SdD8K;Database=project_thewar;";
|
||||||
public static readonly string remoteUrl = "https://manager:BQNl01bJJF0wn9R@gitea.pandoli365.com/Team.thewar/thewar_excel.git";
|
public static readonly string remoteUrl = "https://manager:BQNl01bJJF0wn9R@gitea.pandoli365.com/Team.thewar/thewar_excel.git";
|
||||||
public static readonly Redis redis = new Redis("192.168.1.2", 6379, 1);
|
public static readonly Redis redis = new Redis("192.168.1.2", 6379, 1, "xPEz3x08xQ8G1Fa");
|
||||||
#elif LIVE
|
#elif LIVE
|
||||||
public static readonly string SQL_URL = "Host=192.168.0.2;Port=5432;Username=manager;Password=Zn2zs558W5SdD8K;Database=project_thewar;";
|
public static readonly string SQL_URL = "Host=192.168.0.2;Port=5432;Username=manager;Password=Zn2zs558W5SdD8K;Database=project_thewar;";
|
||||||
public static readonly string EXCEL_SQL_URL = "Host=192.168.0.2;Port=5432;Username=manager;Password=Zn2zs558W5SdD8K;Database=project_thewar;";
|
public static readonly string EXCEL_SQL_URL = "Host=192.168.0.2;Port=5432;Username=manager;Password=Zn2zs558W5SdD8K;Database=project_thewar;";
|
||||||
public static readonly string remoteUrl = "https://manager:BQNl01bJJF0wn9R@gitea.pandoli365.com/Team.thewar/thewar_excel_live.git";
|
public static readonly string remoteUrl = "https://manager:BQNl01bJJF0wn9R@gitea.pandoli365.com/Team.thewar/thewar_excel_live.git";
|
||||||
public static readonly Redis redis = new Redis("192.168.1.2", 6379, 1);
|
public static readonly Redis redis = new Redis("192.168.1.2", 6379, 1, "xPEz3x08xQ8G1Fa");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public static readonly string URL = "https://0.0.0.0:4860";
|
public static readonly string URL = "https://0.0.0.0:4860";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue