From dd710215139505f26f052a7dbdcdb5bf7f2e0532 Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Wed, 31 Jul 2019 15:49:27 -0400 Subject: Fix compiler cache to hold for next transaction. Change-Id: Ibede4a378980717d49708f7665ab295534a092a0 Issue-ID: CCSDK-1046 Signed-off-by: Brinda Santh --- .../blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ms/blueprintsprocessor/modules/inbounds/selfservice-api/src') diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt index 094fb68da..a81d35eac 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt @@ -30,6 +30,8 @@ import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintPathConfigur import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService +import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache +import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils import org.slf4j.LoggerFactory import org.springframework.http.codec.multipart.FilePart @@ -63,6 +65,10 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP throw BluePrintException(ErrorCode.IO_FILE_INTERRUPT.value, "Error in Upload CBA: ${e.message}", e) } finally { + // Clean blueprint script cache + val cacheKey = BluePrintFileUtils + .compileCacheKey(normalizedPathName(bluePrintPathConfiguration.blueprintWorkingPath,saveId)) + BluePrintCompileCache.cleanClassLoader(cacheKey) deleteNBDir(blueprintArchive) deleteNBDir(blueprintWorking) } -- cgit 1.2.3-korg