File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed
Certify.Server.Core/Certify.Server.Core
Certify.Server.HubService Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 11namespace Certify . Server . Core
22{
3- public class StubBackgroundService : BackgroundService
3+ public class AgentBackgroundService : BackgroundService
44 {
5- public StubBackgroundService ( ILoggerFactory loggerFactory )
5+ public AgentBackgroundService ( ILoggerFactory loggerFactory )
66 {
7- Logger = loggerFactory . CreateLogger < StubBackgroundService > ( ) ;
7+ Logger = loggerFactory . CreateLogger < AgentBackgroundService > ( ) ;
88 }
99
1010 public ILogger Logger { get ; }
Original file line number Diff line number Diff line change 66if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
77{
88 builder . Services . AddSystemd ( )
9- . AddHostedService < StubBackgroundService > ( ) ;
9+ . AddHostedService < AgentBackgroundService > ( ) ;
1010}
11-
12- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
11+ else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
1312{
1413 builder . Services . AddWindowsService ( )
15- . AddHostedService < StubBackgroundService > ( ) ;
14+ . AddHostedService < AgentBackgroundService > ( ) ;
1615}
1716
1817builder . Configuration . AddJsonFile ( "appsettings-core.json" , optional : true , reloadOnChange : true ) ;
Original file line number Diff line number Diff line change 8080if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
8181{
8282 builder . Services . AddWindowsService ( )
83- . AddHostedService < StubBackgroundService > ( ) ;
83+ . AddHostedService < AgentBackgroundService > ( ) ;
84+ }
85+ else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
86+ {
87+ builder . Services . AddSystemd ( )
88+ . AddHostedService < AgentBackgroundService > ( ) ;
8489}
8590
8691builder . AddServiceDefaults ( ) ;
You can’t perform that action at this time.
0 commit comments