Class TouchServerJob
Implements periodic server "touching" (to mark as active/deactive) as a hosted service.
Inheritance
System.Object
Namespace: Umbraco.Cms.Infrastructure.BackgroundJobs.Jobs.ServerRegistration
Assembly: Umbraco.Infrastructure.dll
Syntax
public class TouchServerJob : IRecurringBackgroundJob
Constructors
View SourceTouchServerJob(IServerRegistrationService, IHostingEnvironment, ILogger<TouchServerJob>, IOptionsMonitor<GlobalSettings>, IServerRoleAccessor)
Initializes a new instance of the Touch
Declaration
public TouchServerJob(IServerRegistrationService serverRegistrationService, IHostingEnvironment hostingEnvironment, ILogger<TouchServerJob> logger, IOptionsMonitor<GlobalSettings> globalSettings, IServerRoleAccessor serverRoleAccessor)
Parameters
Type | Name | Description |
---|---|---|
IServer |
serverRegistrationService | Services for server registrations. |
IHosting |
hostingEnvironment | The hostingEnviroment. |
ILogger<Touch |
logger | The typed logger. |
IOptions |
globalSettings | The configuration for global settings. |
IServer |
serverRoleAccessor | The accessor for the server role |
Properties
View SourceDelay
Declaration
public TimeSpan Delay { get; }
Property Value
Type | Description |
---|---|
Time |
Period
Declaration
public TimeSpan Period { get; }
Property Value
Type | Description |
---|---|
Time |
ServerRoles
Declaration
public ServerRole[] ServerRoles { get; }
Property Value
Type | Description |
---|---|
Server |
Methods
View SourceRunJobAsync()
Declaration
public Task RunJobAsync()
Returns
Type | Description |
---|---|
Task |
Events
View SourcePeriodChanged
Declaration
public event EventHandler PeriodChanged
Event Type
Type | Description |
---|---|
Event |