mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:33:27 +08:00
后端【升级】:更新所有后端组件到最新版本,调整initq消息队列的使用方法,调整skit微信交互组件的使用方法。
This commit is contained in:
@@ -23,6 +23,21 @@ namespace CoreCms.Net.Core.Config
|
||||
{
|
||||
if (services == null) throw new ArgumentNullException(nameof(services));
|
||||
|
||||
var dbIndex = 0;
|
||||
var ConnectionString = AppSettingsConstVars.RedisConfigConnectionString;
|
||||
if (!string.IsNullOrEmpty(ConnectionString))
|
||||
{
|
||||
var arr = ConnectionString.ToLower().Split(',');
|
||||
if (arr.Length > 1)
|
||||
{
|
||||
var defaultDataBaseStr = arr.FirstOrDefault(p => p.Contains("defaultdatabase"));
|
||||
if (!string.IsNullOrEmpty(defaultDataBaseStr))
|
||||
{
|
||||
dbIndex = defaultDataBaseStr.Split('=').LastOrDefault("0").ObjToInt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
services.AddInitQ(m =>
|
||||
{
|
||||
//没消息时挂起时长(毫秒)
|
||||
@@ -51,6 +66,8 @@ namespace CoreCms.Net.Core.Config
|
||||
};
|
||||
//显示日志
|
||||
m.ShowLog = false;
|
||||
//新增自定redis驱动器
|
||||
m.DbIndex = dbIndex;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user