Merge branch '2.0.0-release' of https://github.com/apache/dolphinscheduler into 2.0.0-release

This commit is contained in:
lenboo 2021-11-18 02:06:01 +08:00
commit 09dbfa2048
3 changed files with 8 additions and 6 deletions

View File

@ -282,10 +282,11 @@ public class TaskDefinitionServiceImpl extends BaseServiceImpl implements TaskDe
putMsg(result, Status.TASK_DEFINE_NOT_EXIST, taskCode);
return result;
}
TaskDefinitionLog taskDefinitionLog = taskDefinitionLogMapper.queryByDefinitionCodeAndVersion(taskCode, version);
taskDefinitionLog.setUserId(loginUser.getId());
taskDefinitionLog.setUpdateTime(new Date());
int switchVersion = taskDefinitionMapper.updateById(taskDefinitionLog);
TaskDefinitionLog taskDefinitionUpdate = taskDefinitionLogMapper.queryByDefinitionCodeAndVersion(taskCode, version);
taskDefinitionUpdate.setUserId(loginUser.getId());
taskDefinitionUpdate.setUpdateTime(new Date());
taskDefinitionUpdate.setId(taskDefinition.getId());
int switchVersion = taskDefinitionMapper.updateById(taskDefinitionUpdate);
if (switchVersion > 0) {
result.put(Constants.DATA_LIST, taskCode);
putMsg(result, Status.SUCCESS);

View File

@ -63,7 +63,7 @@
<if test="userId != 0">
and (
<if test="resIds != null and resIds.size() > 0">
and d.id in
d.id in
<foreach collection="resIds" item="i" open="(" close=") or" separator=",">
#{i}
</foreach>

View File

@ -187,12 +187,13 @@ public class EventExecuteService extends Thread {
StateEventChangeCommand stateEventChangeCommand = new StateEventChangeCommand(
processInstanceId, 0, workflowExecuteThread.getProcessInstance().getState(), processInstance.getId(), taskInstance.getId()
);
stateEventCallbackService.sendResult(address, port, stateEventChangeCommand.convert2Command());
}
@Override
public void onFailure(Throwable throwable) {
logger.info("handle events {} failed.", processInstanceId);
logger.info("handle events failed.", throwable);
}
};
Futures.addCallback(future, futureCallback, this.listeningExecutorService);