Class TouchServerTask
Implements periodic server "touching" (to mark as active/deactive) as a hosted service.
Namespace: Umbraco.Cms.Infrastructure.HostedServices.ServerRegistration
Assembly: cs.temp.dll.dll
Syntax
public class TouchServerTask : RecurringHostedServiceBase, IDisposable
Constructors
TouchServerTask(IRuntimeState, IServerRegistrationService, IHostingEnvironment, ILogger<TouchServerTask>, IOptions<GlobalSettings>)
Declaration
[Obsolete("Use constructor that takes an IServerRoleAccessor")]
public TouchServerTask(IRuntimeState runtimeState, IServerRegistrationService serverRegistrationService, IHostingEnvironment hostingEnvironment, ILogger<TouchServerTask> logger, IOptions<GlobalSettings> globalSettings)
Parameters
Type | Name | Description |
---|---|---|
IRuntime |
runtimeState | |
IServer |
serverRegistrationService | |
IHosting |
hostingEnvironment | |
ILogger<Touch |
logger | |
IOptions<Global |
globalSettings |
TouchServerTask(IRuntimeState, IServerRegistrationService, IHostingEnvironment, ILogger<TouchServerTask>, IOptions<GlobalSettings>, IServerRoleAccessor)
Initializes a new instance of the Touch
Declaration
public TouchServerTask(IRuntimeState runtimeState, IServerRegistrationService serverRegistrationService, IHostingEnvironment hostingEnvironment, ILogger<TouchServerTask> logger, IOptions<GlobalSettings> globalSettings, IServerRoleAccessor serverRoleAccessor)
Parameters
Type | Name | Description |
---|---|---|
IRuntime |
runtimeState | Representation of the state of the Umbraco runtime. |
IServer |
serverRegistrationService | Services for server registrations. |
IHosting |
hostingEnvironment | |
ILogger<Touch |
logger | The typed logger. |
IOptions<Global |
globalSettings | The configuration for global settings. |
IServer |
serverRoleAccessor |
Methods
PerformExecuteAsync(Object)
Declaration
public override Task PerformExecuteAsync(object state)
Parameters
Type | Name | Description |
---|---|---|
System. |
state |
Returns
Type | Description |
---|---|
Task |