You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by wa...@apache.org on 2024/07/24 01:51:33 UTC
(inlong) branch master updated: [INLONG-10711][Manager] Fix the problem of the stream source did not update its status correctly after executing the workflow (#10712)
This is an automated email from the ASF dual-hosted git repository.
wakefu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 93e9a32151 [INLONG-10711][Manager] Fix the problem of the stream source did not update its status correctly after executing the workflow (#10712)
93e9a32151 is described below
commit 93e9a321510448bc2b8b25ef407c11f5e0fd250b
Author: fuweng11 <76...@users.noreply.github.com>
AuthorDate: Wed Jul 24 09:51:28 2024 +0800
[INLONG-10711][Manager] Fix the problem of the stream source did not update its status correctly after executing the workflow (#10712)
---
.../manager/service/listener/source/SourceStartListener.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/listener/source/SourceStartListener.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/listener/source/SourceStartListener.java
index 2ee6f504ae..12246af718 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/listener/source/SourceStartListener.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/listener/source/SourceStartListener.java
@@ -19,6 +19,7 @@ package org.apache.inlong.manager.service.listener.source;
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;
@@ -73,6 +74,12 @@ public class SourceStartListener implements SourceOperateListener {
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) {