This is an automated email from the ASF dual-hosted git repository.
caishunfeng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new dc4cd976c1 add return success judge (#13873)
dc4cd976c1 is described below
commit dc4cd976c1ebc6f76ce69cf259f7c80b3165f061
Author: jackfanwan <[email protected]>
AuthorDate: Wed Apr 19 10:23:20 2023 +0800
add return success judge (#13873)
Co-authored-by: fanwanlong <[email protected]>
---
.../java/org/apache/dolphinscheduler/api/python/PythonGateway.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
index f3b843bd93..4ed8768a7e 100644
---
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
+++
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java
@@ -21,6 +21,7 @@ import
org.apache.dolphinscheduler.api.configuration.PythonGatewayConfiguration;
import org.apache.dolphinscheduler.api.dto.EnvironmentDto;
import org.apache.dolphinscheduler.api.dto.resources.ResourceComponent;
import org.apache.dolphinscheduler.api.enums.Status;
+import org.apache.dolphinscheduler.api.exceptions.ServiceException;
import org.apache.dolphinscheduler.api.service.EnvironmentService;
import org.apache.dolphinscheduler.api.service.ExecutorService;
import org.apache.dolphinscheduler.api.service.ProcessDefinitionService;
@@ -273,6 +274,10 @@ public class PythonGateway {
description, globalParams,
null, timeout, taskRelationJson, taskDefinitionJson,
otherParamsJson,
executionTypeEnum);
+ if (result.get(Constants.STATUS) != Status.SUCCESS) {
+ log.error(result.get(Constants.MSG).toString());
+ throw new
ServiceException(result.get(Constants.MSG).toString());
+ }
processDefinition = (ProcessDefinition)
result.get(Constants.DATA_LIST);
processDefinitionCode = processDefinition.getCode();
}