add-options:增加飞书配置节
This commit is contained in:
parent
0a4103abf5
commit
b95be95910
@ -139,7 +139,7 @@ public class SjzyTrackApplicationModule : AbpModule
|
|||||||
Console.WriteLine("-- 当前为VS本地环境,用内存存储和内存队列");
|
Console.WriteLine("-- 当前为VS本地环境,用内存存储和内存队列");
|
||||||
}
|
}
|
||||||
|
|
||||||
Action<RabbitOptions> action = options =>
|
Action<RabbitOptions> action = options =>
|
||||||
{
|
{
|
||||||
options.ConnectionString =
|
options.ConnectionString =
|
||||||
$"amqp://{configuration["RabbitMQ:UserName"]}:{configuration["RabbitMQ:Password"]}@{configuration["RabbitMQ:HostName"]}:{configuration["RabbitMQ:Port"]}";
|
$"amqp://{configuration["RabbitMQ:UserName"]}:{configuration["RabbitMQ:Password"]}@{configuration["RabbitMQ:HostName"]}:{configuration["RabbitMQ:Port"]}";
|
||||||
@ -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