/** true iff the process has completed (with or without failure) */ public boolean isDone() { return getTask().isDone(); }
/** true iff the ssh job has completed (with or without failure) */ public boolean isDone() { return getTask().isDone(); }
/** true iff the ssh job has completed (with or without failure) */ public boolean isDone() { return getTask().isDone(); }
@Override public boolean isDone() { return isCancelled() || (maxIterations!=null && maxIterations <= runCount) || (period==null && nextRun!=null && nextRun.isDone()); }
@Override public void onTaskFinalization(Task<?> t) { if (!t.isDone()) { // shouldn't happen log.warn("Task "+this+" is being finalized before completion"); return; } if (!Tasks.isAncestorCancelled(t) && !t.isSubmitted()) { log.warn("Task "+this+" was never submitted; did the code forget to run it?"); } } };
public void blockUntilTasksEnded() { while (true) { boolean allDone = true; List<Task<?>> tt = getActiveTasks(); for (Task<?> t: tt) { if (!t.isDone()) { allDone = false; if (log.isDebugEnabled()) log.debug("Pool "+this+", blocking for completion of: "+t); t.blockUntilEnded(); } } synchronized (activeTasks) { List<Task> newTT = new ArrayList<Task>(getActiveTasks()); newTT.removeAll(tt); if (allDone && tt.isEmpty()) { //task list has stabilized, and there are no active tasks; clear and exit if (log.isDebugEnabled()) log.debug("Pool "+this+", all known tasks have completed, clearing list"); activeTasks.clear(); break; } if (log.isDebugEnabled()) log.debug("Pool "+this+", all previously known tasks have completed, but there are new tasks ("+newTT+") checking them"); } } }
if (numTasksToDelete > 0) { for (Task<?> taskToDelete : sortedTasks.subList(0, numTasksToDelete)) { if (!taskToDelete.isDone()) break; executionManager.deleteTask(taskToDelete); if (taskContender.isDone() && (System.currentTimeMillis() - taskContender.getEndTimeUtc() > maxTaskAge)) { executionManager.deleteTask(taskContender); } else {
out.append(" = "); if (isSecret(it.getName())) out.append("xxxxxxxx"); else if ((v instanceof Task) && ((Task<?>)v).isDone()) { if (((Task<?>)v).isError()) { out.append("ERROR in "+v);