private static boolean isHealthyUnderPath(String path, long timeout) {
        if (path == null) {
            return true;
        }
        List<String> commands = generateCommands(path);
        if (commands != null && commands.size() > 0) {
            for (String command : commands) {
                ScriptProcessLauncher scriptProcessLauncher = new ScriptProcessLauncher(command, timeout);
                ExitStatus exit = scriptProcessLauncher.launch();
                if (exit.equals(ExitStatus.FAILED)) {
                    return false;
                }
            }
            return true;
        } else {
            return true;
        }
    }
private static boolean isHealthyUnderPath ( String path , long timeout ) { if ( path == null ) { return true ; } List < String > commands = generateCommands ( path ) ; if ( commands != null && commands . size ( ) > 0 ) { for ( String command : commands ) { ScriptProcessLauncher scriptProcessLauncher = new ScriptProcessLauncher ( command , timeout ) ; ExitStatus exit = scriptProcessLauncher . launch ( ) ; if ( exit . equals ( ExitStatus . FAILED ) ) { return false ; } } return true ; } else { return true ; } }
return false if the health check failed when running the scripts under the path