Files
crawler-plugin/backend-java/src/main/java/com/nanri/aiimage/config/LlmHttpConfigResolver.java
T
huangzd1997 67f28c5b4f refactor(队列): coze 残留改名到 task-queue / LLM,直连改造后不再出现第三方平台名
货源查询与外观专利早已改成直连 LLM,但配置键、指标名、类名与注释里的 "coze" 还留着,
排查线上问题时按平台名 grep 到的是已经不参与调用的历史命名。

对外可见的两处改名(运维需同步):
- 配置键 aiimage.coze-task.{max-concurrent,max-waiting} -> aiimage.task-queue.*
- 指标 aiimage.coze-task.submit.rejected.total / .execution.duration / .queue.wait.duration
  -> aiimage.task-queue.*   (Grafana 面板与告警表达式要一起改,否则曲线断流)
SimilarAsinTaskServiceCozeBufferScopeTest 随之改名(git 识别为 R)。
OSS 签名域名测试改用 example-cdn.com 占位,不再依赖真实 coze.cn 域名形态。
SimilarAsinTaskServiceTest 补上 result.notice 两条口径的测试:缺必填字段的行显示「未检测」
而不是留白(28551:790/1000 行空白仍报成功),404 行优先显示「ASIN未找到」。
2026-09-27 11:27:27 +08:00

39 lines
1.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.nanri.aiimage.config;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
/**
* LLM 客户端统一配置解析(task-168)。
*
* 从 aiimage.http-client.* 命名空间读取 LLM 客户端超时/重试,默认值与现状一致
* (connect 10s / read 60s / call 90s / retry 3);非法值钳制。模块级显式配置
* (SimilarAsinProperties.llm*)优先级高于命名空间(行为不变)。
*/
@Component
@RequiredArgsConstructor
public class LlmHttpConfigResolver {
private final HttpClientProperties httpClientProperties;
public long connectTimeoutMillis() {
return httpClientProperties.effectiveConnectTimeoutMillis();
}
public long readTimeoutMillis() {
return httpClientProperties.effectiveReadTimeoutMillis();
}
public long callTimeoutMillis() {
return httpClientProperties.effectiveCallTimeoutMillis();
}
public int maxRetries() {
return httpClientProperties.effectiveMaxRetries();
}
public long baseRetryDelayMillis() {
return httpClientProperties.getBaseRetryDelayMillis();
}
}