|
|
|
@ -59,7 +59,6 @@ using Volo.Abp.SecurityLog; |
|
|
|
using Volo.Abp.Auditing; |
|
|
|
using Volo.Abp.BackgroundWorkers.Hangfire; |
|
|
|
using Hangfire; |
|
|
|
using Hangfire.PostgreSql; |
|
|
|
using Volo.Abp.BackgroundWorkers; |
|
|
|
using Shentun.Peis.Schedulers; |
|
|
|
using System.Threading.Tasks; |
|
|
|
@ -74,6 +73,7 @@ using Microsoft.AspNetCore.DataProtection; |
|
|
|
using Volo.Abp.OpenIddict; |
|
|
|
using System.Security.Cryptography.X509Certificates; |
|
|
|
using Shentun.Peis.Controllers; |
|
|
|
using Hangfire.Redis; |
|
|
|
|
|
|
|
|
|
|
|
namespace Shentun.Peis; |
|
|
|
@ -88,6 +88,7 @@ namespace Shentun.Peis; |
|
|
|
typeof(AbpAspNetCoreSerilogModule), |
|
|
|
typeof(AbpSwashbuckleModule), |
|
|
|
typeof(AbpBackgroundWorkersHangfireModule) |
|
|
|
|
|
|
|
)] |
|
|
|
public class PeisHttpApiHostModule : AbpModule |
|
|
|
{ |
|
|
|
@ -224,7 +225,7 @@ public class PeisHttpApiHostModule : AbpModule |
|
|
|
option.AllowCustomFlow("phone_verify"); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context.Services.AddTransient<MiniProgramTokenController>(); |
|
|
|
|
|
|
|
////虚拟目录
|
|
|
|
@ -498,12 +499,19 @@ public class PeisHttpApiHostModule : AbpModule |
|
|
|
|
|
|
|
private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration) |
|
|
|
{ |
|
|
|
//context.Services.AddHangfire(config =>
|
|
|
|
//{
|
|
|
|
// config.UsePostgreSqlStorage(configuration.GetConnectionString("Default"));
|
|
|
|
//});
|
|
|
|
|
|
|
|
context.Services.AddHangfire(config => |
|
|
|
{ |
|
|
|
config.UsePostgreSqlStorage(configuration.GetConnectionString("Default")); |
|
|
|
config.UseRedisStorage(configuration["Hangfire:ConnectionStrings"], new RedisStorageOptions |
|
|
|
{ |
|
|
|
Db = string.IsNullOrWhiteSpace(configuration["Hangfire:Db"]) ? 0 : Convert.ToInt32(configuration["Hangfire:Db"]) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
public override async void OnApplicationInitialization(ApplicationInitializationContext context) |
|
|
|
{ |
|
|
|
|