From 837ccc8020a53cd1b595f2bf35a671599c833b57 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 30 Dec 2019 19:55:13 +0100 Subject: [PATCH] null se non ho busta... --- Jenkinsfile | 2 +- NKC_WF/Controllers/BatchProcController.cs | 29 +++++------------------ 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 39ade72..5d46226 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=149']) { + withEnv(['NEXT_BUILD_NUMBER=151']) { // env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'NKC' diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs index 2a102b0..6e6c27e 100644 --- a/NKC_WF/Controllers/BatchProcController.cs +++ b/NKC_WF/Controllers/BatchProcController.cs @@ -20,31 +20,9 @@ namespace NKC_WF.Controllers public batchRequest Get() { batchRequest answ = new batchRequest(); - // in primis: controllo su redis SE HO una richiista CURRENT di processing... -#if false - string redKey = $"{ComLib.currBatchReqKey}"; - string redVal = memLayer.ML.getRSV(redKey); - string envNum = redVal; - // se c'è carico "la busta" come ID - if (!string.IsNullOrEmpty(redVal)) - { - // cerco in REDIS se ci sia l'item richiesto - redKey = $"{ComLib.redOutPath}:{redVal}"; - // leggo da redis la stringa... - redVal = memLayer.ML.getRSV(redKey); - // PROVO a deserializzare... - try - { - answ = JsonConvert.DeserializeObject(redVal); - // aggiungo LA SUA ENV NUM!!!! - answ.EnvNum = envNum; - } - catch - { } - } -#endif string redKey = ""; string redVal = ""; + // in primis: controllo su redis SE HO una richiesta CURRENT di processing... string envNum = ComLib.currBatchReq; // se c'è carico "la busta" come ID if (!string.IsNullOrEmpty(envNum)) @@ -63,6 +41,11 @@ namespace NKC_WF.Controllers catch { } } + // altrimenti NULL! + else + { + answ = null; + } return answ; }