Hisoka-X commented on code in PR #3946:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3946#discussion_r1071677578


##########
seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ClientExecuteCommand.java:
##########
@@ -112,14 +114,18 @@ public void execute() throws CommandExecuteException {
                 startTime = LocalDateTime.now();
                 // create job proxy
                 ClientJobProxy clientJobProxy = jobExecutionEnv.execute();
+                // register cancelJob hook
+                if (clientCommandArgs.isCloseJob()) {
+                    Runtime.getRuntime().addShutdownHook(new Thread(() -> 
shutdownHook(clientJobProxy)));

Review Comment:
   I'm not sure if shutdownHook throw some exception, the console can show it? 
If not, please use try catch then log it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to