[fix-15907] Fix get remote shell exit code is incorrect (#15911)
* ./mvnw spotless:apply * Update dolphinscheduler-task-plugin/dolphinscheduler-task-remoteshell/src/main/java/org/apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java Co-authored-by: Wenjun Ruan <wenjun@apache.org> --------- Co-authored-by: 詹子恒 <ziheng.zhan@longbridge.sg> Co-authored-by: Wenjun Ruan <wenjun@apache.org> Co-authored-by: Rick Cheng <rickchengx@gmail.com>
This commit is contained in:
parent
ba5de75829
commit
5c569b705c
|
|
@ -131,7 +131,7 @@ public class RemoteExecutor implements AutoCloseable {
|
||||||
int exitCode = -1;
|
int exitCode = -1;
|
||||||
log.info("Remote shell task run status: {}", logLine);
|
log.info("Remote shell task run status: {}", logLine);
|
||||||
if (logLine.contains(STATUS_TAG_MESSAGE)) {
|
if (logLine.contains(STATUS_TAG_MESSAGE)) {
|
||||||
String status = logLine.replace(STATUS_TAG_MESSAGE, "").trim();
|
String status = StringUtils.substringAfter(logLine, STATUS_TAG_MESSAGE);
|
||||||
if (status.equals("0")) {
|
if (status.equals("0")) {
|
||||||
log.info("Remote shell task success");
|
log.info("Remote shell task success");
|
||||||
exitCode = 0;
|
exitCode = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue