aloyszhang commented on code in PR #9890:
URL: https://github.com/apache/inlong/pull/9890#discussion_r1542777103


##########
inlong-agent/agent-installer/src/main/java/org/apache/inlong/agent/installer/ManagerFetcher.java:
##########
@@ -128,63 +122,21 @@ private Runnable configFetchThread() {
             Thread.currentThread().setName("ManagerFetcher");
             while (isRunnable()) {
                 try {
-                    int configSleepTime = conf.getInt(AGENT_FETCHER_INTERVAL, 
DEFAULT_AGENT_FETCHER_INTERVAL);
-                    ConfigResult config = getTestConfig();
+                    ConfigResult config = getConfig();
                     if (config != null) {
                         manager.getModuleManager().submitConfig(config);
                     }
-                    
TimeUnit.SECONDS.sleep(AgentUtils.getRandomBySeed(configSleepTime));
                 } catch (Throwable ex) {
                     LOGGER.warn("exception caught", ex);
                     ThreadUtils.threadThrowableHandler(Thread.currentThread(), 
ex);
+                } finally {
+                    int configSleepTime = conf.getInt(AGENT_FETCHER_INTERVAL, 
DEFAULT_AGENT_FETCHER_INTERVAL);
+                    AgentUtils.silenceSleepInSeconds(configSleepTime);

Review Comment:
   ```suggestion
                       
AgentUtils.silenceSleepInSeconds(conf.getInt(AGENT_FETCHER_INTERVAL, 
DEFAULT_AGENT_FETCHER_INTERVAL));
   ```



-- 
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