@Override public void done(String message, Exception e) { if (emitOutput) { System.out.println( '\n' + "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"); System.out.println(" RunBook : " + runbook.getRunBookPath() + " | " + " State : COMPLETE"); System.out.println(" Error Reason :"); e.printStackTrace(); System.out.println( "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-" + '\n'); } try { execStatus.setEndTime(System.currentTimeMillis()); // TODO: handle exception later. execStatus.setComplete(true); execStatus.setFinerStatus(message); execStatus.setState(ExecState.FAILED); store.update(execStatus); store.done(); } finally { barrier.release(blockingKey); } }
@Override public void done(String message) { if (emitOutput) { System.out.println( '\n' + "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"); System.out.println(" RunBook : " + runbook.getRunBookPath() + " | " + " COMPLETE"); System.out.println( "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-" + '\n'); } try { execStatus.setEndTime(System.currentTimeMillis()); execStatus.setComplete(true); execStatus.setState(didLatestStepFail() ? ExecState.FAILED : ExecState.SUCCESSFUL); execStatus.setFinerStatus(message); store.update(execStatus); store.done(); } finally { barrier.release(blockingKey); } }