This is an automated email from the ASF dual-hosted git repository.
wakefu pushed a commit to branch branch-1.13
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/branch-1.13 by this push:
new 23d4b3e3f0 [INLONG-10711][Manager] Fix the problem of the stream
source did not update its status correctly after executing the workflow (#10712)
23d4b3e3f0 is described below
commit 23d4b3e3f0a9e05cd12522bdc45e5d1327cd7943
Author: fuweng11 <[email protected]>
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) {