Keep track of progress for ExecWatch #5396
Unanswered
ssolanki38
asked this question in
Q&A
Replies: 1 comment
-
exitCode().get() is a blocking call that will simply wait until the CompletableFuture is done. Use other methods such as CompletableFuture.isDone to check without blocking. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using ExecWatch to execute a script on a pod. This script is copying some files on the pod to a different directory, and it takes a variable amount of time depending on how many files are on the given pod.
How can I implement a way to periodically check if the ExecWatch thread is complete? Currently I'm implementing ExecWatch like so:
try (ExecWatch execWatch = execCmd(podName, namespace, cmd)) { logger.info("sleep"); Thread.sleep(7 * 1000L); exitCode = execWatch.exitCode().get(); }
I want to asynchronously start the execWatch and check to see if it's done after some variable amount of time. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions