Class TargetDeploymentRuntimeSupervisor
java.lang.Object
org.craftercms.deployer.impl.tasks.TargetDeploymentRuntimeSupervisor
@Component
@ConditionalOnProperty("deployer.main.deployments.supervisor.enabled")
public class TargetDeploymentRuntimeSupervisor
extends Object
Cron task that checks the runtime of deployments for all targets.
If a deployment has been running longer than the configured threshold,
it triggers a
DeploymentRuntimeWarningEvent
in the target-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkDeploymentRuntime
(Target target) Checks the runtime of the current deployment for a target.void
-
Field Details
-
targetService
-
-
Constructor Details
-
TargetDeploymentRuntimeSupervisor
@ConstructorProperties("targetService") public TargetDeploymentRuntimeSupervisor(TargetService targetService)
-
-
Method Details
-
checkDeploymentsRuntime
@Scheduled(cron="${deployer.main.deployments.supervisor.cron}") public void checkDeploymentsRuntime() throws TargetServiceException- Throws:
TargetServiceException
-
checkDeploymentRuntime
Checks the runtime of the current deployment for a target. If there is a running deployment and its runtime exceeds the configured threshold, it triggers aDeploymentRuntimeWarningEvent
for the target.- Parameters:
target
- the target to check
-