Browse Source

Merge pull request #19 from lenboo/dev

fix bug spelling error in process dao
pull/1/head
easyscheduler 6 years ago committed by GitHub
parent
commit
011eca5d79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      escheduler-api/src/main/java/cn/escheduler/api/controller/ProcessDefinitionController.java
  2. 5
      escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java
  3. 2
      escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java
  4. 2
      escheduler-server/src/main/java/cn/escheduler/server/zk/ZKMasterClient.java

2
escheduler-api/src/main/java/cn/escheduler/api/controller/ProcessDefinitionController.java

@ -127,7 +127,7 @@ public class ProcessDefinitionController extends BaseController{
logger.info("login user {}, update process define, project name: {}, process define name: {}, " + logger.info("login user {}, update process define, project name: {}, process define name: {}, " +
"process_definition_json: {}, desc: {}, locations:{}, connects:{}", "process_definition_json: {}, desc: {}, locations:{}, connects:{}",
loginUser.getUserName(), projectName, name, processDefinitionJson,desc, locations, connects); loginUser.getUserName(), projectName, name, processDefinitionJson,desc, locations, connects);
Map<String, Object> result = processDefinitionService.updateProccessDefinition(loginUser, projectName, id, name, Map<String, Object> result = processDefinitionService.updateProcessDefinition(loginUser, projectName, id, name,
processDefinitionJson, desc, locations, connects); processDefinitionJson, desc, locations, connects);
return returnDataList(result); return returnDataList(result);
}catch (Exception e){ }catch (Exception e){

5
escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java

@ -247,9 +247,9 @@ public class ProcessDefinitionService extends BaseDAGService {
* @param connects * @param connects
* @return * @return
*/ */
public Map<String, Object> updateProccessDefinition(User loginUser, String projectName, int id, String name, public Map<String, Object> updateProcessDefinition(User loginUser, String projectName, int id, String name,
String processDefinitionJson, String desc, String processDefinitionJson, String desc,
String locations, String connects) throws JsonProcessingException { String locations, String connects) {
Map<String, Object> result = new HashMap<>(5); Map<String, Object> result = new HashMap<>(5);
Project project = projectMapper.queryByName(projectName); Project project = projectMapper.queryByName(projectName);
@ -284,7 +284,6 @@ public class ProcessDefinitionService extends BaseDAGService {
processDefine.setName(name); processDefine.setName(name);
processDefine.setReleaseState(ReleaseState.OFFLINE); processDefine.setReleaseState(ReleaseState.OFFLINE);
processDefine.setProjectId(project.getId()); processDefine.setProjectId(project.getId());
processDefine.setUserId(loginUser.getId());
processDefine.setProcessDefinitionJson(processDefinitionJson); processDefine.setProcessDefinitionJson(processDefinitionJson);
processDefine.setDesc(desc); processDefine.setDesc(desc);
processDefine.setLocations(locations); processDefine.setLocations(locations);

2
escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java

@ -1272,7 +1272,7 @@ public class ProcessDao extends AbstractBaseDao {
return scheduleMapper.queryById(id); return scheduleMapper.queryById(id);
} }
public List<ProcessInstance> queryNeddFailoverProcessInstances(String host){ public List<ProcessInstance> queryNeedFailoverProcessInstances(String host){
return processInstanceMapper.queryByHostAndStatus(host, stateArray); return processInstanceMapper.queryByHostAndStatus(host, stateArray);
} }

2
escheduler-server/src/main/java/cn/escheduler/server/zk/ZKMasterClient.java

@ -256,7 +256,7 @@ public class ZKMasterClient extends AbstractZKClient {
logger.info("start master failover ..."); logger.info("start master failover ...");
List<ProcessInstance> needFailoverProcessInstanceList = processDao.queryNeddFailoverProcessInstances(masterHost); List<ProcessInstance> needFailoverProcessInstanceList = processDao.queryNeedFailoverProcessInstances(masterHost);
//updateProcessInstance host is null and insert into command //updateProcessInstance host is null and insert into command
for(ProcessInstance processInstance : needFailoverProcessInstanceList){ for(ProcessInstance processInstance : needFailoverProcessInstanceList){

Loading…
Cancel
Save