Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
5c77a867
Commit
5c77a867
authored
Nov 24, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Startup取消hangfire注释
parent
2c276221
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
performance/Performance.Api/Startup.cs
+15
-15
No files found.
performance/Performance.Api/Startup.cs
View file @
5c77a867
...
...
@@ -153,15 +153,15 @@ public void ConfigureServices(IServiceCollection services)
services
.
AddHostedService
<
QueuedHostedService
>();
services
.
AddSingleton
<
IBackgroundTaskQueue
,
BackgroundTaskQueue
>();
//
#region hangfire
//
//
services.AddHangfire(config =>
//
{
//
config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 });
//
config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString));
//
});
//
//
#endregion hangfire
#
region
hangfire
services
.
AddHangfire
(
config
=>
{
config
.
UseFilter
(
new
AutomaticRetryAttribute
{
Attempts
=
0
});
config
.
UseStorage
(
new
MySqlStorage
(
connection
.
Value
.
HangfireConnectionString
));
});
#
endregion
hangfire
services
.
AddSignalR
();
services
.
AddCors
(
options
=>
...
...
@@ -243,12 +243,12 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
#
endregion
Swagger
//
#region hangfire
//
//
app.UseHangfireServer();
//
app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } });
//
//
#endregion hangfire
#
region
hangfire
app
.
UseHangfireServer
();
app
.
UseHangfireDashboard
(
"/hangfire"
,
new
DashboardOptions
{
Authorization
=
new
[]
{
new
HangfireAuthorizationFilter
()
}
});
#
endregion
hangfire
app
.
UseCors
(
"SignalrCore"
);
app
.
UseSignalR
(
routes
=>
routes
.
MapHub
<
AllotLogHub
>(
"/performance/allotLogHub"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment