package com.rj.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * 说明 {@link com.rj.scheduler.YihangyiVllmAsrScheduler} 的加载条件，避免与根节点 {@code asr.*} 混淆。
 */
@Slf4j
@Component
@ConditionalOnProperty(name = "app.audio.upload.yihangyi.asr.enabled", havingValue = "false", matchIfMissing = true)
public class YihangyiVllmAsrEnablementListener {

    @EventListener(ApplicationReadyEvent.class)
    public void onReady() {
        log.info(
                "YihangyiVllmAsrScheduler 未启用：需设置 app.audio.upload.yihangyi.asr.enabled=true（当前为 false 或未配置）。"
                        + "根配置 asr.enabled 用于其它 ASR 能力，不会加载本调度类。");
    }
}
