Startup取消hangfire注释

parent 2c276221
...@@ -153,15 +153,15 @@ public void ConfigureServices(IServiceCollection services) ...@@ -153,15 +153,15 @@ public void ConfigureServices(IServiceCollection services)
services.AddHostedService<QueuedHostedService>(); services.AddHostedService<QueuedHostedService>();
services.AddSingleton<IBackgroundTaskQueue, BackgroundTaskQueue>(); services.AddSingleton<IBackgroundTaskQueue, BackgroundTaskQueue>();
// #region hangfire #region hangfire
//
// services.AddHangfire(config => services.AddHangfire(config =>
// { {
// config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 }); config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 });
// config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString)); config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString));
// }); });
//
// #endregion hangfire #endregion hangfire
services.AddSignalR(); services.AddSignalR();
services.AddCors(options => services.AddCors(options =>
...@@ -243,12 +243,12 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF ...@@ -243,12 +243,12 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
#endregion Swagger #endregion Swagger
// #region hangfire #region hangfire
//
// app.UseHangfireServer(); app.UseHangfireServer();
// app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } }); app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } });
//
// #endregion hangfire #endregion hangfire
app.UseCors("SignalrCore"); app.UseCors("SignalrCore");
app.UseSignalR(routes => routes.MapHub<AllotLogHub>("/performance/allotLogHub")); app.UseSignalR(routes => routes.MapHub<AllotLogHub>("/performance/allotLogHub"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment