Skip to content

Instantly share code, notes, and snippets.

@ssedano
Created January 5, 2012 18:23
Show Gist options
  • Save ssedano/1566498 to your computer and use it in GitHub Desktop.
Save ssedano/1566498 to your computer and use it in GitHub Desktop.
awaitCompletion
public void awaitCompletion(final Task task)
{
Predicate<Task> jobComplete = TaskPredicates.done(); // evals the task.getState()
System.out.println("Hola!" + task.getState() + " " + task.getTaskId());
RetryablePredicate<Task> r =
new RetryablePredicate<Task>(jobComplete, 3600000l);
r.apply(task);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment