Package com.atlassian.jira.cluster
Class ClusterTaskCleanupService
java.lang.Object
com.atlassian.jira.cluster.ClusterTaskCleanupService
- All Implemented Interfaces:
com.atlassian.scheduler.JobRunner
@ParametersAreNonnullByDefault
@ReturnValuesAreNonnullByDefault
public class ClusterTaskCleanupService
extends Object
implements com.atlassian.scheduler.JobRunner
Responsible for cleaning unfinished tasks from
TaskManager that are assigned to offline nodes.
Such tasks are usually a result of a node being stopped abruptly. Due to the implementation details of TaskManager,
Jira cluster will keep thinking that the task is still running, preventing users to retry some actions until the original
task is finished, which will never happen.
The behavior of this service can be adjusted by modifying RUN_INTERVAL_PROPERTY_KEY
and OFFLINE_NODE_THRESHOLD_PROPERTY_KEY properties.
- Since:
- v8.5.4, v8.6.2, v8.7.1, v8.8.0
-
Constructor Summary
ConstructorsConstructorDescriptionClusterTaskCleanupService(com.atlassian.scheduler.SchedulerService schedulerService, ClusterManager clusterManager, ClusterNodeHeartbeatService heartbeatService, TaskManager taskManager, FeatureManager featureManager, ApplicationProperties applicationProperties) -
Method Summary
-
Constructor Details
-
ClusterTaskCleanupService
public ClusterTaskCleanupService(com.atlassian.scheduler.SchedulerService schedulerService, ClusterManager clusterManager, ClusterNodeHeartbeatService heartbeatService, TaskManager taskManager, FeatureManager featureManager, ApplicationProperties applicationProperties)
-
-
Method Details
-
start
public void start() -
stop
public void stop() -
runJob
public com.atlassian.scheduler.JobRunnerResponse runJob(com.atlassian.scheduler.JobRunnerRequest request) - Specified by:
runJobin interfacecom.atlassian.scheduler.JobRunner
-