fix(similarasin): LLM 切换 gemini-3.8-flash + 修复双实例 stale 判死盲区
- 模型切换:glm-5.3-flash / gemini-3.7-flash(类目/合规/图片对比,appearancepatent)→ gemini-3.8-flash 涉及 SimilarAsinProperties、AppearancePatentProperties、application.yml、TLS 探针与测试断言 - stale 判死盲区:finalizeStaleTasks 去掉 isOwnerCurrent 过滤,改由 job 锁持有实例全局判死 (任务 27117 线上死因:客户端 done 信号被任务锁拒后断线,owner 过滤导致无人判死, 被另一实例 job stuck 扫描误判为"文件生成任务运行超时";appearancepatent 同源盲区一并修复) - 客户端回传重试:3x2s → 8 次,40902 锁忙固定等 15s(app_client/similar_asin.py,随客户端发包生效)
This commit is contained in:
+3
-3
@@ -126,7 +126,7 @@ class AppearancePatentLlmClientHttpTest {
|
||||
assertThat(result.getAppearanceReason()).contains("视觉拆解");
|
||||
assertThat(result.getTitleReason()).contains("Apple");
|
||||
assertThat(callCounts.get("deepseek-v4-flash")).hasValue(1);
|
||||
assertThat(callCounts.get("gemini-3.7-flash")).hasValue(1);
|
||||
assertThat(callCounts.get("gemini-3.8-flash")).hasValue(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -162,7 +162,7 @@ class AppearancePatentLlmClientHttpTest {
|
||||
AppearancePatentResultRowDto result = rows.get(0);
|
||||
assertThat(result.getAppearanceRisk()).isEqualTo("外观识别异常");
|
||||
assertThat(callCounts.get("deepseek-v4-flash")).isNull();
|
||||
assertThat(callCounts.get("gemini-3.7-flash")).isNull();
|
||||
assertThat(callCounts.get("gemini-3.8-flash")).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -182,7 +182,7 @@ class AppearancePatentLlmClientHttpTest {
|
||||
client.inspectRows(List.of(row("6", "B006", "普通数据线", "", "https://img.example.com/6.jpg")), null, "test-key");
|
||||
|
||||
String appearanceBody = capturedBodies.stream()
|
||||
.filter(b -> b.contains("gemini-3.7-flash"))
|
||||
.filter(b -> b.contains("gemini-3.8-flash"))
|
||||
.findFirst()
|
||||
.orElseThrow();
|
||||
assertThat(appearanceBody).contains("https://img.example.com/6.jpg");
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public class LlmGatewayTlsProbe {
|
||||
}
|
||||
HttpClient client = builder.build();
|
||||
try {
|
||||
String body = "{\"model\":\"glm-5.3-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}],\"max_tokens\":10}";
|
||||
String body = "{\"model\":\"gemini-3.8-flash\",\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}],\"max_tokens\":10}";
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(URI.create("https://" + host + "/v1/chat/completions"))
|
||||
.timeout(Duration.ofSeconds(30))
|
||||
|
||||
Reference in New Issue
Block a user