add-options:增加飞书配置节
This commit is contained in:
parent
0a4103abf5
commit
b95be95910
@ -208,6 +208,14 @@ public class SjzyTrackApplicationModule : AbpModule
|
|||||||
// 注册预警任务后台服务
|
// 注册预警任务后台服务
|
||||||
context.Services.AddHostedService<WarningTaskComponentBackgroundService>();
|
context.Services.AddHostedService<WarningTaskComponentBackgroundService>();
|
||||||
|
|
||||||
|
// 注册飞书服务(用于预警通知)
|
||||||
|
context.Services.AddFeishuNetSdk(o =>
|
||||||
|
{
|
||||||
|
o.AppId = configuration.GetValue<string>("FeiShu:AppId")!;
|
||||||
|
o.AppSecret = configuration.GetValue<string>("FeiShu:AppSecret")!;
|
||||||
|
o.EnableLogging = configuration.GetValue<bool>("FeiShu:EnableLogging");
|
||||||
|
});
|
||||||
|
|
||||||
// 注册HangFire服务
|
// 注册HangFire服务
|
||||||
context.Services.Configure<TrackWarningTaskOptions>(configuration.GetSection("WarningTask"));
|
context.Services.Configure<TrackWarningTaskOptions>(configuration.GetSection("WarningTask"));
|
||||||
context.Services.AddHangfire(o =>
|
context.Services.AddHangfire(o =>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user