You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2022/09/08 01:56:27 UTC

[inlong] branch master updated: [INLONG-5820][Manager] Fix the auto push source task operating problem (#5821)

This is an automated email from the ASF dual-hosted git repository.

healchow 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 56a3dbf07 [INLONG-5820][Manager] Fix the auto push source task operating problem (#5821)
56a3dbf07 is described below

commit 56a3dbf0796e4d6913267dea9ff3846a5e2c9f34
Author: woofyzhao <49...@qq.com>
AuthorDate: Thu Sep 8 09:56:21 2022 +0800

    [INLONG-5820][Manager] Fix the auto push source task operating problem (#5821)
---
 .../inlong/manager/service/source/AbstractSourceOperator.java     | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java
index d97dff612..096a57deb 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/AbstractSourceOperator.java
@@ -21,6 +21,7 @@ import com.github.pagehelper.Page;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.inlong.manager.common.consts.InlongConstants;
+import org.apache.inlong.manager.common.consts.SourceType;
 import org.apache.inlong.manager.common.enums.ErrorCodeEnum;
 import org.apache.inlong.manager.common.enums.GroupStatus;
 import org.apache.inlong.manager.common.enums.SourceStatus;
@@ -78,7 +79,12 @@ public abstract class AbstractSourceOperator implements StreamSourceOperator {
     public Integer saveOpt(SourceRequest request, Integer groupStatus, String operator) {
         StreamSourceEntity entity = CommonBeanUtils.copyProperties(request, StreamSourceEntity::new);
         if (GroupStatus.forCode(groupStatus).equals(GroupStatus.CONFIG_SUCCESSFUL)) {
-            entity.setStatus(SourceStatus.TO_BE_ISSUED_ADD.getCode());
+            if (request.getSourceType().equals(SourceType.AUTO_PUSH)) {
+                // auto push task needs not be issued to agent
+                entity.setStatus(SourceStatus.SOURCE_NORMAL.getCode());
+            } else {
+                entity.setStatus(SourceStatus.TO_BE_ISSUED_ADD.getCode());
+            }
         } else {
             entity.setStatus(SourceStatus.SOURCE_NEW.getCode());
         }