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 TouchServerJob class.
Declaration
public TouchServerJob(IServerRegistrationService serverRegistrationService, IHostingEnvironment hostingEnvironment, ILogger<TouchServerJob> logger, IOptionsMonitor<GlobalSettings> globalSettings, IServerRoleAccessor serverRoleAccessor)
Parameters
| Type | Name | Description |
|---|---|---|
| IServerRegistrationService | serverRegistrationService | Services for server registrations. |
| IHostingEnvironment | hostingEnvironment | The hostingEnviroment. |
| ILogger<TouchServerJob> | logger | The typed logger. |
| IOptionsMonitor<GlobalSettings> | globalSettings | The configuration for global settings. |
| IServerRoleAccessor | serverRoleAccessor | The accessor for the server role |
Properties
View SourceDelay
Declaration
public TimeSpan Delay { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Period
Declaration
public TimeSpan Period { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
ServerRoles
Declaration
public ServerRole[] ServerRoles { get; }
Property Value
| Type | Description |
|---|---|
| ServerRole[] |
Methods
View SourceRunJobAsync()
Declaration
public Task RunJobAsync()
Returns
| Type | Description |
|---|---|
| Task |
Events
View SourcePeriodChanged
Declaration
public event EventHandler PeriodChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |