feat:修改互换交易样式以支持展示新风控内容,将rule与application加载前移到系统启动时
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
using Microsoft.AspNetCore.Hosting.Server;
|
||||
using Microsoft.AspNetCore.Hosting.Server;
|
||||
using Microsoft.AspNetCore.Hosting.Server.Features;
|
||||
using YLErp.DBModels.Consts;
|
||||
using YLErp.Modules.AppModule;
|
||||
using YLErp.Modules.EodModule.SettlementModule;
|
||||
using YLErp.Modules.RiskEngine;
|
||||
using YLErp.Modules.RiskModule;
|
||||
using YLErp.Modules.SuperviseReportModule.SAC.Service;
|
||||
using YLErp.Modules.TradeRiskCalcModule;
|
||||
@@ -123,6 +124,19 @@ namespace YLErp.Web.App
|
||||
{
|
||||
PS.SetConfig(ConsAppConfig.YLErpWebUrlConfig, address);
|
||||
}
|
||||
|
||||
// 预热风控引擎:加载规则与应用到内存,并预编译所有规则
|
||||
Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
RiskEngineService.GetInstance().Preload();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogFactory.GetLogger("HostedTaskService").Error("[风控引擎] 启动预热失败", ex);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
||||
Reference in New Issue
Block a user