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
      docs/zh_CN/后端部署文档.md
  2. 2
      escheduler-api/src/main/java/cn/escheduler/api/controller/ProcessDefinitionController.java
  3. 7
      escheduler-api/src/main/java/cn/escheduler/api/service/ProcessDefinitionService.java
  4. 2
      escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java
  5. 2
      escheduler-server/src/main/java/cn/escheduler/server/zk/ZKMasterClient.java

2
docs/zh_CN/后端部署文档.md

@ -545,7 +545,7 @@ sh ./bin/escheduler-daemon.sh stop alert-server
- 使用部署用户 sh install.sh 一键部署 - 使用部署用户 sh install.sh 一键部署
- 注意:scp_hosts.sh 里 `tar -zxvf $workDir/../escheduler-1.0.0.tar.gz -C $installPath` 中的版本号(1.0.0)需要执行前手动替换成对应的版本号 - 注意:scp_hosts.sh 里 `tar -zxvf $workDir/../escheduler-1.0.0.tar.gz -C $installPath` 中的版本号(1.0.0)需要执行前手动替换成对应的版本号
## 服务监控 ## 服务监控
monitor_server.py 脚本是监听,master和worker服务挂掉重启的脚本 monitor_server.py 脚本是监听,master和worker服务挂掉重启的脚本

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){

7
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