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>
This commit is contained in:
parent
a137b6e8ac
commit
eb73f6ddf3
|
|
@ -131,9 +131,7 @@ public class RemoteExecutor implements AutoCloseable {
|
|||
int exitCode = -1;
|
||||
log.info("Remote shell task run status: {}", logLine);
|
||||
if (logLine.contains(STATUS_TAG_MESSAGE)) {
|
||||
int startIndex = logLine.indexOf(STATUS_TAG_MESSAGE) + STATUS_TAG_MESSAGE.length();
|
||||
int endIndex = logLine.length();
|
||||
String status = logLine.substring(startIndex, endIndex);
|
||||
String status = StringUtils.substringAfter(logLine, STATUS_TAG_MESSAGE);
|
||||
if (status.equals("0")) {
|
||||
log.info("Remote shell task success");
|
||||
exitCode = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue