private void addModule(ModuleConfig module) {
        LOGGER.info("add module {}({}) start", module.getId(), module.getName());
        addAndSaveModuleConfig(module);
        if (!downloadModule(module)) {
            LOGGER.error("add module {}({}) but download failed", module.getId(), module.getName());
            return;
        }
        saveModuleState(module.getId(), ModuleStateEnum.DOWNLOADED);
        installModule(module);
        saveModuleState(module.getId(), ModuleStateEnum.INSTALLED);
        startModule(module);
        LOGGER.info("add module {}({}) end", module.getId(), module.getName());
    }
Thread for core thread.

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