Class OrphanedBuildMonitorJob
- All Implemented Interfaces:
org.quartz.Job
In case we find a problematic build we cannot just remove it: 1. maybe an agent is already working on it, but just did not report in yet (agentId == null, but everything OK) 2. maybe the agent is not responsive (agentId != null, agent may or may not come back). 3. maybe 1. happened and will be followed by 2. 4. maybe the build is currently finishing, but the mechanism catches it by accident - build that is finishing properly is indistinguishable from build that is stuck in finishing state. etc.etc. In case of 1., we should give the agent some time to report in. In case of 2. or 3., we should let the AgentManager remove the agent and the build, it will do so in heartbeatTimeoutSeconds+heartbeat seconds In case of 4., we should let the build finish naturally before intervening on chain level. So, waiting heartbeatTimeoutSeconds + 2xheartbeat before taking action seems like a good idea
-
Field Summary
FieldsFields inherited from class com.atlassian.bamboo.quartz.cluster.ClusterAwareJob
SCHEDULED_DURATION_BETWEEN_EXECUTIONS_CRON_CONST, SCHEDULED_DURATION_BETWEEN_EXECUTIONS_SECONDS_CONST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteBody(org.quartz.JobExecutionContext jobExecutionContext) This is the job real work to be performed.protected JobExecutionModeDetermines the execution mode for this job.Methods inherited from class com.atlassian.bamboo.quartz.cluster.ClusterAwareJob
execute, extractDurationBetweenExecutionsSeconds, getDurationBetweenExecutionsInSeconds
-
Field Details
-
MAP_KEY_REACTION_DELAY
- See Also:
-
-
Constructor Details
-
OrphanedBuildMonitorJob
public OrphanedBuildMonitorJob()
-
-
Method Details
-
executeBody
public void executeBody(org.quartz.JobExecutionContext jobExecutionContext) throws org.quartz.JobExecutionException Description copied from class:ClusterAwareJobThis is the job real work to be performed. Every job that is based on this parent cluster aware job needs to implement this method and place here stuff that would be normally put in #execute(JobExecutionContext)- Specified by:
executeBodyin classClusterAwareJob- Throws:
org.quartz.JobExecutionException
-
executionMode
Description copied from class:ClusterAwareJobDetermines the execution mode for this job.The execution mode defines how this job should execute in a clustered environment. Implementations should return the appropriate mode based on their execution requirements (e.g., LOCAL, PRIMARY, or CLUSTERED).
- Specified by:
executionModein classClusterAwareJob
-