From 48dd960ba30b0c07c56ee644c39e96eebad9c35e Mon Sep 17 00:00:00 2001 From: swatipersistent <99341045+swatipersistent@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:21:37 +0530 Subject: [PATCH] source pulling and deployment (#246) Changes related to source pulling and deployment status --- src/main/java/com/cx/restclient/common/Waiter.java | 3 +++ src/main/java/com/cx/restclient/dto/Status.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cx/restclient/common/Waiter.java b/src/main/java/com/cx/restclient/common/Waiter.java index 43558bc6..19c7f0f7 100644 --- a/src/main/java/com/cx/restclient/common/Waiter.java +++ b/src/main/java/com/cx/restclient/common/Waiter.java @@ -46,6 +46,9 @@ public T waitForTaskToFinish(String taskId, Integer scanTimeoutSec, Logger log) if (retry <= 0) { throw new CxClientException(FAILED_MSG + scanType + ". Error message: " + e.getMessage(), e); } + if (statusResponse == null || (statusResponse.getBaseStatus() == null)) { + statusResponse = (T) new BaseStatus(Status.SOURCE_PULLING_AND_DEPLOYMENT); + } if (statusResponse == null || (statusResponse.getBaseStatus() == null)) { statusResponse = (T) new BaseStatus(Status.IN_PROGRESS); } diff --git a/src/main/java/com/cx/restclient/dto/Status.java b/src/main/java/com/cx/restclient/dto/Status.java index 3494ad53..390420ec 100644 --- a/src/main/java/com/cx/restclient/dto/Status.java +++ b/src/main/java/com/cx/restclient/dto/Status.java @@ -8,8 +8,8 @@ public enum Status { IN_PROGRESS("In progress"), SUCCEEDED("Succeeded"), - FAILED("Failed"); - + FAILED("Failed"), + SOURCE_PULLING_AND_DEPLOYMENT ("SourcePullingAndDeployment"); private String value;