mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-02 04:08:31 +08:00
[feat] Support set execute type to pydolphinscheduler (#12871)
Up to now, we can only submit workflow with parallel mode. this patch give users ability specific execute type to workflow
This commit is contained in:
parent
229c554912
commit
87a88e3662
@ -245,12 +245,13 @@ public class PythonGateway {
|
||||
String taskRelationJson,
|
||||
String taskDefinitionJson,
|
||||
String otherParamsJson,
|
||||
ProcessExecutionTypeEnum executionType) {
|
||||
String executionType) {
|
||||
User user = usersService.queryUser(userName);
|
||||
Project project = projectMapper.queryByName(projectName);
|
||||
long projectCode = project.getCode();
|
||||
|
||||
ProcessDefinition processDefinition = getProcessDefinition(user, projectCode, name);
|
||||
ProcessExecutionTypeEnum executionTypeEnum = ProcessExecutionTypeEnum.valueOf(executionType);
|
||||
long processDefinitionCode;
|
||||
// create or update process definition
|
||||
if (processDefinition != null) {
|
||||
@ -258,13 +259,15 @@ public class PythonGateway {
|
||||
// make sure process definition offline which could edit
|
||||
processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode,
|
||||
ReleaseState.OFFLINE);
|
||||
Map<String, Object> result = processDefinitionService.updateProcessDefinition(user, projectCode, name,
|
||||
processDefinitionService.updateProcessDefinition(user, projectCode, name,
|
||||
processDefinitionCode, description, globalParams,
|
||||
null, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType);
|
||||
null, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson,
|
||||
executionTypeEnum);
|
||||
} else {
|
||||
Map<String, Object> result = processDefinitionService.createProcessDefinition(user, projectCode, name,
|
||||
description, globalParams,
|
||||
null, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType);
|
||||
null, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson,
|
||||
executionTypeEnum);
|
||||
processDefinition = (ProcessDefinition) result.get(Constants.DATA_LIST);
|
||||
processDefinitionCode = processDefinition.getCode();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user