Skip to main content

seed_webp_settings_from_env

Function seed_webp_settings_from_env 

Source
pub(crate) async fn seed_webp_settings_from_env(
    client: &Client,
) -> Result<(), AppError>
Expand description

启动时用 WEBP_QUALITY / WEBP_METHOD 环境变量播种 WebP 编码配置。

语义与 seed_security_settings_from_env 一致:仅当对应 settings 键 不存在时插入(首次部署),之后以面板写入的 DB 值为准。单个变量非法只 告警跳过。这些值在进程启动时烘焙进 LazyLock,改 DB 值后需重启生效。