From d0ec4426cbe4da7dbf94a4faf6e36c032a81c395 Mon Sep 17 00:00:00 2001 From: "Smokowski, Steven" Date: Fri, 7 Feb 2020 17:14:39 -0500 Subject: Initial commit to check client alive Initial commit to check client alive Issue-ID: SO-2653 Signed-off-by: Benjamin, Max (mb388a) Change-Id: Ib9f4cf7f5815bd9b8d0d42417f3e5fd83382547a --- .../so/adapters/appc/orchestrator/AppcOrchestratorApplication.java | 2 ++ .../appc/orchestrator/service/ApplicationControllerTaskService.java | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'adapters/so-appc-orchestrator') diff --git a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/AppcOrchestratorApplication.java b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/AppcOrchestratorApplication.java index 258c95ac89..0230d7f518 100644 --- a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/AppcOrchestratorApplication.java +++ b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/AppcOrchestratorApplication.java @@ -22,6 +22,7 @@ package org.onap.so.adapters.appc.orchestrator; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableScheduling; /** * @since Version 1.0 @@ -29,6 +30,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; */ @SpringBootApplication(scanBasePackages = {"org.onap"}) +@EnableScheduling public class AppcOrchestratorApplication { private static final String LOGS_DIR = "logs_dir"; diff --git a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskService.java b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskService.java index 2a33124eac..3484e0992f 100644 --- a/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskService.java +++ b/adapters/so-appc-orchestrator/src/main/java/org/onap/so/adapters/appc/orchestrator/service/ApplicationControllerTaskService.java @@ -1,6 +1,7 @@ package org.onap.so.adapters.appc.orchestrator.service; import javax.annotation.PostConstruct; +import org.camunda.bpm.client.ExternalTaskClient; import org.onap.so.utils.ExternalTaskServiceUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Profile; @@ -23,8 +24,9 @@ public class ApplicationControllerTaskService { @PostConstruct public void appcOrchestrator() throws Exception { for (int i = 0; i < externalTaskServiceUtils.getMaxClients(); i++) { - externalTaskServiceUtils.createExternalTaskClient().subscribe("AppcService").lockDuration(604800000) - .handler(appcOrchestrator::executeExternalTask).open(); + ExternalTaskClient client = externalTaskServiceUtils.createExternalTaskClient(); + client.subscribe("AppcService").lockDuration(604800000).handler(appcOrchestrator::executeExternalTask) + .open(); } } -- cgit 1.2.3-korg