TaskRunnerEntrypoint { public static void main(String[] args) throws InterruptedException { if (args.length < 1) { LOG.info("Usage: flo-task-runner <persisted-task-file>"); System.exit(1); } final String file = args[0]; final URI fileUri = URI.create(file); final Path filePath = Paths.get(fileUri); final EvaluatingContext evaluatingContext = new EvaluatingContext( filePath.resolveSibling(""), MemoizingContext.composeWith( InstrumentedContext.composeWith( EvalContext.sync(), new LoggingListener()))); final EvalContext.Value<Object> value = evaluatingContext.evaluateTaskFrom(filePath); final CompletableFuture<Object> future = new CompletableFuture<>(); value.consume(future::complete); value.onFail(future::completeExceptionally); try { future.get(24, TimeUnit.HOURS); } catch (ExecutionException | TimeoutException e) { e.printStackTrace(); System.exit(1); } }  static void main(String[] args);  }
@Test public void evalEntrypointShouldProduceOutputOfTask() throws Exception { Task<String> task = EvaluatingContextTest.singleTask("world"); Path persistedPath = subTest.persist(task).get(task.id()); TaskRunnerEntrypoint.main(new String[]{persistedPath.toUri().toString()}); assertTrue(Files.exists(subTest.basePath.resolve(cleanForFilename(task.id()) + OUTPUT_SUFFIX))); }