private boolean hasCommandInProgress(Stage stage, String host) {
    List<ExecutionCommandWrapper> commandWrappers = stage.getExecutionCommands(host);
    for (ExecutionCommandWrapper wrapper : commandWrappers) {
      ExecutionCommand c = wrapper.getExecutionCommand();
      String roleStr = c.getRole();
      HostRoleStatus status = stage.getHostRoleStatus(host, roleStr);
      if (status == HostRoleStatus.IN_PROGRESS) {
        return true;
      }
    }
    return false;
  }
Checks if timeout is required.
@param status      the status of the current role
@param stage       the stage
@param host        the host object; can be {@code null} for server-side tasks
@param role        the role
@param currentTime the current
@param taskTimeout the amount of time to determine timeout
@return {@code true} if timeout is needed
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java