hangfire测试
This commit is contained in:
@@ -18,6 +18,8 @@ using Yi.Framework.WebCore.LogExtend;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||
using Yi.Framework.WebCore.AutoFacExtend;
|
||||
using Hangfire;
|
||||
using Hangfire.MemoryStorage;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Configuration.AddCommandLine(args);
|
||||
@@ -78,6 +80,15 @@ builder.Services.AddSqlsugarServer(DbFiterExtend.Data);
|
||||
//Quartz<74><7A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#endregion
|
||||
builder.Services.AddQuartzService();
|
||||
builder.Services.AddHangfire(option =>
|
||||
{
|
||||
option.SetDataCompatibilityLevel(CompatibilityLevel.Version_170);//ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD>ü<EFBFBD><C3BC>ݰ汾<DDB0><E6B1BE><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>
|
||||
option.UseColouredConsoleLogProvider();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־
|
||||
option.UseSimpleAssemblyNameTypeSerializer();//ʹ<>ü<C3BC><F2B5A5B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD>
|
||||
option.UseRecommendedSerializerSettings();//ʹ<><CAB9><EFBFBD>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD>
|
||||
option.UseMemoryStorage();
|
||||
});
|
||||
builder.Services.AddHangfireServer();
|
||||
#region
|
||||
//AutoMapperע<72><D7A2>
|
||||
#endregion
|
||||
@@ -85,7 +96,8 @@ builder.Services.AddAutoMapperService();
|
||||
#region
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#endregion
|
||||
builder.Services.AddControllers(optios => {
|
||||
builder.Services.AddControllers(optios =>
|
||||
{
|
||||
//ע<><D7A2>ȫ<EFBFBD><C8AB>
|
||||
optios.Filters.Add<GlobalLogAttribute>();
|
||||
}).AddJsonFileService();
|
||||
@@ -228,6 +240,10 @@ app.UseDbSeedInitService();
|
||||
#endregion
|
||||
app.UseRedisSeedInitService();
|
||||
|
||||
app.UseHangfireDashboard();
|
||||
|
||||
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
#region
|
||||
@@ -235,6 +251,7 @@ app.UseEndpoints(endpoints =>
|
||||
#endregion
|
||||
endpoints.MapHub<MainHub>("/api/hub/main");
|
||||
endpoints.MapControllers();
|
||||
endpoints.MapHangfireDashboard();
|
||||
});
|
||||
|
||||
//<><D7BC><EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><D3B6>⻧
|
||||
|
||||
Reference in New Issue
Block a user