use of com.netflix.titus.cli.CommandContext in project titus-control-plane by Netflix.
the class JobGetCommand method subscribeToJobUpdateStream.
private void subscribeToJobUpdateStream(CommandContext context, String id) throws InterruptedException {
CountDownLatch latch = new CountDownLatch(1);
context.getJobManagementClient().observeJob(id).doFinally(signal -> latch.countDown()).subscribe(job -> logger.info("Job notification: {}", job), e -> logger.error("Command execution error", e));
latch.await();
}
Aggregations