Skip to content

Commit

Permalink
[INLONG-10711][Manager] Fix the problem of the stream source did not …
Browse files Browse the repository at this point in the history
…update its status correctly after executing the workflow (#10712)
  • Loading branch information
fuweng11 authored Jul 24, 2024
1 parent 35c72c1 commit 93e9a32
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import org.apache.inlong.manager.common.consts.InlongConstants;
import org.apache.inlong.manager.common.enums.GroupOperateType;
import org.apache.inlong.manager.common.enums.SourceStatus;
import org.apache.inlong.manager.common.enums.TaskEvent;
import org.apache.inlong.manager.pojo.source.SourceRequest;
import org.apache.inlong.manager.pojo.source.StreamSource;
Expand Down Expand Up @@ -73,6 +74,12 @@ public ListenerResult listen(WorkflowContext context) throws Exception {
InlongStreamInfo streamInfo = form.getStreamInfo();
final String groupId = streamInfo.getInlongGroupId();
final String streamId = streamInfo.getInlongStreamId();
if (InlongConstants.DATASYNC_REALTIME_MODE.equals(form.getGroupInfo().getInlongGroupMode())
|| InlongConstants.DATASYNC_OFFLINE_MODE.equals(form.getGroupInfo().getInlongGroupMode())) {
streamSourceService.updateStatus(groupId, streamId, SourceStatus.SOURCE_NORMAL.getCode(), operator);
} else {
streamSourceService.updateStatus(groupId, streamId, SourceStatus.TO_BE_ISSUED_ADD.getCode(), operator);
}
log.info("begin to update agent task config for groupId={}, streamId={}", groupId, streamId);
List<StreamSource> sources = streamSourceService.listSource(groupId, streamId);
for (StreamSource source : sources) {
Expand Down

0 comments on commit 93e9a32

Please sign in to comment.