public boolean isInProgressCommand(CommandReport report) {
    HostRoleCommand command = db.getTask(report.getTaskId());
    if (command == null) {
      LOG.warn("The task " + report.getTaskId() + " is invalid");
      return false;
    }
    return command.getStatus().equals(HostRoleStatus.IN_PROGRESS)
      || command.getStatus().equals(HostRoleStatus.QUEUED);
  }
Find if the command report is for an in progress command
@param report
@return
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java