Skip to content

Commit

Permalink
Merge pull request #134 from CiscoM31/revert-128-ISICO-14209
Browse files Browse the repository at this point in the history
Revert "ISICO-14209: excessive log messages are removed"
  • Loading branch information
sarmuru2 authored Dec 14, 2022
2 parents ef9c482 + 42e7b18 commit d2515e1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
@ProtoMessage
public class Workflow extends Auditable {

public static String WORKFLOW_DEFINITION_IS_NULL = "Workflow definition is null";

@ProtoEnum
public enum WorkflowStatus {
RUNNING(false, false),
Expand Down Expand Up @@ -330,7 +328,7 @@ public void setPriority(int priority) {
* @return the workflow definition name.
*/
public String getWorkflowName() {
Preconditions.checkNotNull(workflowDefinition, WORKFLOW_DEFINITION_IS_NULL);
Preconditions.checkNotNull(workflowDefinition, "Workflow definition is null");
return workflowDefinition.getName();
}

Expand All @@ -340,7 +338,7 @@ public String getWorkflowName() {
* @return the workflow definition version.
*/
public int getWorkflowVersion() {
Preconditions.checkNotNull(workflowDefinition, WORKFLOW_DEFINITION_IS_NULL);
Preconditions.checkNotNull(workflowDefinition, "Workflow definition is null");
return workflowDefinition.getVersion();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,8 @@ void postNotification(
HttpPost request = createPostRequest(url, data, headers);
long start = System.currentTimeMillis();
executePost(request);
long duration = System.currentTimeMillis() - start;
if (duration > 100) {
logger.info("Round trip response time = " + (duration) + " millis");
}
long end = System.currentTimeMillis();
logger.info("Round trip response time = " + (end - start) + " millis");
}

private String prepareUrl(RestClientManager.NotificationType notifType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ boolean isResponseTimedOut(TaskDef taskDefinition, Task task) {
Monitors.recordTaskPendingTime(task.getTaskType(), task.getWorkflowType(), pendingTime);
long thresholdMS = taskPendingTimeThresholdMins * 60 * 1000;
if (pendingTime > thresholdMS) {
LOGGER.debug(
LOGGER.warn(
"Task: {} of type: {} in workflow: {}/{} is in pending state for longer than {} ms",
task.getTaskId(),
task.getTaskType(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,6 @@ public String startWorkflow(
workflow.getWorkflowName(),
String.valueOf(workflow.getWorkflowVersion()),
workflow.getOwnerApp());
LOGGER.info(
"Start workflow request completed for workflowId {} correlationId {}",
workflowId,
correlationId);
return workflowId;
} catch (Exception e) {
Monitors.recordWorkflowStartError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import com.netflix.conductor.common.run.Workflow;
import com.netflix.conductor.core.WorkflowContext;
import com.netflix.conductor.core.config.ConductorProperties;
import com.netflix.conductor.core.exception.ApplicationException;
Expand Down Expand Up @@ -93,19 +92,10 @@ public void sweep(String workflowId) {
e);
}
} catch (Exception e) {
if (Workflow.WORKFLOW_DEFINITION_IS_NULL.equals(e.getMessage())) {
queueDAO.remove(DECIDER_QUEUE, workflowId);
LOGGER.info(
"Workflow Definition not found for {}. Removed it from decider queue",
workflowId);
} else {
queueDAO.setUnackTimeout(
DECIDER_QUEUE,
workflowId,
properties.getWorkflowOffsetTimeout().toMillis());
Monitors.error(CLASS_NAME, "sweep");
LOGGER.error("Error running sweep for " + workflowId, e);
}
queueDAO.setUnackTimeout(
DECIDER_QUEUE, workflowId, properties.getWorkflowOffsetTimeout().toMillis());
Monitors.error(CLASS_NAME, "sweep");
LOGGER.error("Error running sweep for " + workflowId, e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

public class RedisPinger {

private static final Logger logger = LoggerFactory.getLogger(RedisPinger.class);
private static final Logger log = LoggerFactory.getLogger(RedisPinger.class);
private static final int CONNECTION_TIMEOUT = 3000;

public boolean ping(Host host) {
Expand Down Expand Up @@ -54,11 +54,11 @@ public boolean ping(Host host) {
if ("PONG".equalsIgnoreCase(pingResponse)) {
return true;
} else {
logger.error("Ping failed for host {} pingResponse {}", host, pingResponse);
log.error("Ping failed for host {} pingResponse {}", host, pingResponse);
return false;
}
} catch (Exception ee) {
logger.error("Error while pinging dynomite host {}", host, ee);
log.error("Error while pinging dynomite host {}", host, ee);
return false;
} finally {
if (jedisPool != null) {
Expand Down

0 comments on commit d2515e1

Please sign in to comment.