Skip to content

Commit

Permalink
[INLONG-9447][Manager] Fix the problem of suspend group failed (#9448)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuweng11 authored Dec 8, 2023
1 parent 18329ba commit 9d6a5f6
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.inlong.manager.pojo.group.InlongGroupInfo;
import org.apache.inlong.manager.pojo.group.InlongGroupRequest;
import org.apache.inlong.manager.pojo.group.InlongGroupUtils;
import org.apache.inlong.manager.pojo.stream.InlongStreamInfo;
import org.apache.inlong.manager.pojo.workflow.form.process.GroupResourceProcessForm;
import org.apache.inlong.manager.service.group.InlongGroupService;
import org.apache.inlong.manager.service.source.StreamSourceService;
Expand All @@ -37,9 +38,12 @@
import org.apache.inlong.manager.workflow.event.process.ProcessEventListener;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
* The listener of InlongGroup when created resources successfully.
*/
Expand Down Expand Up @@ -86,6 +90,10 @@ public ListenerResult listen(WorkflowContext context) throws WorkflowListenerExc
InlongGroupRequest updateGroupRequest = groupInfo.genRequest();
updateGroupRequest.setVersion(existGroup.getVersion());
groupService.update(updateGroupRequest, operator);
List<InlongStreamInfo> streamInfos = form.getStreamInfos();
if (CollectionUtils.isNotEmpty(streamInfos)) {
streamInfos.forEach(streamInfo -> streamService.updateWithoutCheck(streamInfo.genRequest(), operator));
}
streamService.updateStatus(groupId, null, StreamStatus.CONFIG_SUCCESSFUL.getCode(), operator);

// update status of other related configs
Expand Down

0 comments on commit 9d6a5f6

Please sign in to comment.