private void addAndSaveModuleConfig(ModuleConfig module) {
        module.setState(ModuleStateEnum.NEW);
        if (currentModules.containsKey(module.getId())) {
            LOGGER.error("should not happen! module {}({}) found! will force to replace it!", module.getId(),
                    module.getName());
        }
        currentModules.put(module.getId(), module);
        saveToLocalFile(confPath);
    }
Thread for core thread.

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