private boolean saveModuleState(Integer moduleId, ModuleStateEnum state) {
        ModuleConfig module = currentModules.get(moduleId);
        if (module == null) {
            LOGGER.error("should not happen! module {} not found!", moduleId);
            return false;
        }
        module.setState(state);
        saveToLocalFile(confPath);
        LOGGER.info("save module {}({}) state to {}", module.getId(), module.getName(), state);
        return true;
    }
Thread for core thread.

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