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

healchow pushed a commit to branch release-1.3.0
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/release-1.3.0 by this push:
     new 41bfafc87 [INLONG-5820][Manager] Fix the auto push source task 
operating problem (#5821)
41bfafc87 is described below

commit 41bfafc87b0a00a3c3e4a25a74766b55e62039cd
Author: woofyzhao <[email protected]>
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());
         }

Reply via email to