fuweng11 commented on code in PR #8028:
URL: https://github.com/apache/inlong/pull/8028#discussion_r1194512285


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java:
##########
@@ -663,4 +670,22 @@ public void run() {
         }
     }
 
+    /**
+     * update task which in an incorrect state
+     */
+    private class TaskCleanRunnable implements Runnable {
+
+        @Override
+        public void run() {
+            while (true) {
+                try {
+                    sourceMapper.updateStatusByDeleted();
+                    Thread.sleep(60 * 10000);

Review Comment:
   Fixed



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java:
##########
@@ -138,11 +140,16 @@ public class AgentServiceImpl implements AgentService {
      */
     @PostConstruct
     private void startHeartbeatTask() {
-        if (enabled) {
+        if (updateTaskTimeoutEnabled) {
             UpdateTaskRunnable taskRunnable = new UpdateTaskRunnable();
             this.executorService.execute(taskRunnable);
             LOGGER.info("update task status started successfully");
         }
+        if (sourceCleanEnabled) {
+            TaskCleanRunnable taskCleanRunnable = new TaskCleanRunnable();
+            this.executorService.execute(taskCleanRunnable);

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to