Browse Source

HPCC-26323 Add option to persist Syntax Check WorkUnits

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
wangkx 3 years ago
parent
commit
7e82c65da3

+ 1 - 1
esp/scm/ws_workunits.ecm

@@ -25,7 +25,7 @@ EspInclude(ws_workunits_queryset_req_resp);
 
 ESPservice [
     auth_feature("DEFERRED"), //This declares that the method logic handles feature level authorization
-    version("1.87"), default_client_version("1.87"), cache_group("ESPWsWUs"),
+    version("1.88"), default_client_version("1.88"), cache_group("ESPWsWUs"),
     noforms,exceptions_inline("./smc_xslt/exceptions.xslt"),use_method_name] WsWorkunits
 {
     ESPmethod [cache_seconds(60), resp_xsl_default("/esp/xslt/workunits.xslt")]     WUQuery(WUQueryRequest, WUQueryResponse);

+ 1 - 1
esp/scm/ws_workunits_req_resp.ecm

@@ -739,7 +739,7 @@ ESPrequest WUSyntaxCheckRequest
     string Cluster;
     string Snapshot;
     int    TimeToWait(60000);
-
+    [min_ver("1.88")] bool PersistWorkunit(false);
     [min_ver("1.04")] ESParray<ESPstruct DebugValue>       DebugValues;
 };
 

+ 2 - 1
esp/services/ws_workunits/ws_workunitsService.cpp

@@ -1285,7 +1285,8 @@ bool CWsWorkunitsEx::onWUSyntaxCheckECL(IEspContext &context, IEspWUSyntaxCheckR
         case WUStateAborted:
         case WUStateCompleted:
         case WUStateFailed:
-            factory->deleteWorkUnitEx(wuid.str(), true);
+            if (!req.getPersistWorkunit())
+                factory->deleteWorkUnitEx(wuid.str(), true);
             break;
         default:
             abortWorkUnit(wuid.str(), context.querySecManager(), context.queryUser());