将依赖事件总线的发布订阅模式,改为直接调用的形式
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using IGeekFan.AspNetCore.Knife4jUI;
|
||||
using System.Reflection;
|
||||
using IGeekFan.AspNetCore.Knife4jUI;
|
||||
using JNPF.API.Entry.Handlers;
|
||||
using JNPF.Common.Cache;
|
||||
using JNPF.Common.Core;
|
||||
@@ -62,15 +63,14 @@ public class Startup : AppStartup
|
||||
.AddSenparcWeixinServices(App.Configuration); // Senparc.Weixin 注册(如果使用Senparc.Weixin SDK则添加)
|
||||
|
||||
services.AddOverideVisualDev();
|
||||
//注册任务消息通知 added by ly on 20230814
|
||||
//services.AddTaskMessageNotify();
|
||||
|
||||
SnowflakeIdHelper.InitYitIdWorker();
|
||||
//定时任务
|
||||
//services.AddHostedService<TimedTaskBackgroundService>();
|
||||
services.AddHostedService<TimedTaskBackgroundService>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IServiceProvider serviceProvider, IOptions<SenparcSetting> senparcSetting, IOptions<SenparcWeixinSetting> senparcWeixinSetting)
|
||||
{
|
||||
// 添加状态码拦截中间件
|
||||
@@ -115,7 +115,7 @@ public class Startup : AppStartup
|
||||
endpoints.MapControllerRoute(name: "default", pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
});
|
||||
|
||||
//SnowflakeIdHelper.InitYitIdWorker();
|
||||
SnowflakeIdHelper.InitYitIdWorker();
|
||||
|
||||
bool isStartTimeJob = App.GetConfig<bool>("IsStartTimeJob");
|
||||
if (isStartTimeJob)
|
||||
|
||||
Reference in New Issue
Block a user