private void traverseManagerModulesToLocal(Map<Integer, ModuleConfig> modulesFromManager) {
        modulesFromManager.values().forEach((managerModule) -> {
            ModuleConfig localModule = currentModules.get(managerModule.getId());
            if (localModule == null) {
                LOGGER.info("traverseManagerModulesToLocal module {}({}) {} not found in local, add it",
                        managerModule.getId(), managerModule.getName(), managerModule.getVersion());
                addModule(managerModule);
            } else {
                if (managerModule.getMd5().equals(localModule.getMd5())) {
                    LOGGER.info("traverseManagerModulesToLocal module {}({}) {} md5 no change, do nothing",
                            localModule.getId(), localModule.getName(), localModule.getVersion());
                } else {
                    LOGGER.info("traverseManagerModulesToLocal module {}({}) {} md5 changed, update it",
                            localModule.getId(), localModule.getName(), localModule.getVersion());
                    updateModule(localModule, managerModule);
                }
            }
        });
    }
Thread for core thread.

@return runnable profile.
inlong-agent/agent-installer/src/main/java/org/apache/inlong/agent/installer/ModuleManager.java