Don't use EELFLoggerDelegate.errorLogger in Async jobs
[vid.git] / vid-app-common / src / main / java / org / onap / vid / job / command / VfmoduleCommand.kt
index 731625c..29d7001 100644 (file)
@@ -193,7 +193,7 @@ class VfmoduleCommand @Autowired constructor(
             val replaceMyselfCommand = planReplaceMyselfRestCall(commandParentData)
             return executeAndHandleMsoInstanceRequest(replaceMyselfCommand)
         } catch (exception: Exception) {
-            LOGGER.error(EELFLoggerDelegate.errorLogger, "Failed to replace instanceId ${getRequest().instanceId} ", exception)
+            LOGGER.error("Failed to replace instanceId ${getRequest().instanceId} ", exception)
             return Job.JobStatus.FAILED
         }
     }
@@ -207,9 +207,6 @@ class VfmoduleCommand @Autowired constructor(
         val serviceModelInfo = serviceModelInfoFromRequest()
         val modelNewestUuid = commandUtils.getNewestModelUuid(serviceModelInfo.modelInvariantId);
 
-        check(!modelNewestUuid.equals(serviceModelInfo.modelVersionId, true)) {
-            "Model version id ${serviceModelInfo.modelVersionId} is already the latest version of model's invariant id ${serviceModelInfo.modelInvariantId}" }
-
         val serviceNewestModel = commandUtils.getServiceModel(modelNewestUuid);
 
         return serviceNewestModel;