Future<?> future = service.submit(() -> {
try {
baseAccept(path);
} catch (AutomaticExecutionFailedException ex) {
//do not rethrow, failure was expected, cleanup has been done
} catch (Exception ex) {
ManualUtils.moveToManual(Config.REJECTED_DIRECTORY, path);
throw ex;
}
});
try {
future.get();
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
} catch (ExecutionException ex) {