aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java3
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java16
2 files changed, 2 insertions, 17 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
index bcc3739c32..6debcfbff6 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
@@ -333,8 +333,6 @@ public class WorkflowResource extends ProcessEngineAwareService {
public void run() {
setLogContext(processKey, inputVariables);
- long startTime = System.currentTimeMillis();
-
try {
RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
@@ -557,7 +555,6 @@ public class WorkflowResource extends ProcessEngineAwareService {
// TODO filter only set of variables
WorkflowResponse response = new WorkflowResponse();
- long startTime = System.currentTimeMillis();
try {
ProcessEngineServices engine = getProcessEngineServices();
List<HistoricVariableInstance> variables = engine.getHistoryService().createHistoricVariableInstanceQuery()
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
index 9cf71538b1..ad1e46a1c6 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
+++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
@@ -114,7 +114,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
private List<InfraActiveRequests> executeInfraQuery(final CriteriaQuery<InfraActiveRequests> crit,
final List<Predicate> predicates, final Order order) {
- final long startTime = System.currentTimeMillis();
logger.debug("Execute query on infra active request table");
final CriteriaBuilder cb = entityManager.getCriteriaBuilder();
@@ -131,15 +130,12 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
*/
@Override
public InfraActiveRequests getRequestFromInfraActive(final String requestId) {
- final long startTime = System.currentTimeMillis();
logger.debug("Get request {} from InfraActiveRequests DB", requestId);
- InfraActiveRequests ar = null;
final Query query = entityManager
.createQuery("from InfraActiveRequests where requestId = :requestId OR clientRequestId = :requestId");
query.setParameter(REQUEST_ID, requestId);
- ar = this.getSingleResult(query);
- return ar;
+ return this.getSingleResult(query);
}
/*
@@ -239,7 +235,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(
final Map<String, List<String>> orchestrationMap) {
-
final List<Predicate> predicates = new LinkedList<>();
final CriteriaBuilder cb = entityManager.getCriteriaBuilder();
final CriteriaQuery<InfraActiveRequests> crit = cb.createQuery(InfraActiveRequests.class);
@@ -416,17 +411,13 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
*/
@Override
public InfraActiveRequests getRequestFromInfraActive(final String requestId, final String requestType) {
- final long startTime = System.currentTimeMillis();
logger.debug("Get infra request from DB with id {}", requestId);
- InfraActiveRequests ar = null;
-
final Query query = entityManager.createQuery(
"from InfraActiveRequests where (requestId = :requestId OR clientRequestId = :requestId) and requestType = :requestType");
query.setParameter(REQUEST_ID, requestId);
query.setParameter(REQUEST_TYPE, requestType);
- ar = this.getSingleResult(query);
- return ar;
+ return this.getSingleResult(query);
}
@@ -440,7 +431,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
public InfraActiveRequests checkDuplicateByVnfName(final String vnfName, final String action,
final String requestType) {
- final long startTime = System.currentTimeMillis();
logger.debug("Get infra request from DB for VNF {} and action {} and requestType {}", vnfName, action,
requestType);
@@ -470,7 +460,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
public InfraActiveRequests checkDuplicateByVnfId(final String vnfId, final String action,
final String requestType) {
- final long startTime = System.currentTimeMillis();
logger.debug("Get list of infra requests from DB for VNF {} and action {}", vnfId, action);
InfraActiveRequests ar = null;
@@ -496,7 +485,6 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
*/
@Override
public InfraActiveRequests checkVnfIdStatus(final String operationalEnvironmentId) {
- final long startTime = System.currentTimeMillis();
logger.debug("Get Infra request from DB for OperationalEnvironmentId {}", operationalEnvironmentId);
InfraActiveRequests ar = null;