更新地址 更新后端
This commit is contained in:
+8
-3
@@ -1231,7 +1231,7 @@ public class SimilarAsinTaskService {
|
||||
String prompt = readAiPrompt(task);
|
||||
String apiKey = readApiKey(task);
|
||||
boolean imgSwitch = readImgSwitch(task);
|
||||
int batchSize = Math.max(1, properties.getCozeBatchSize());
|
||||
int batchSize = resolveCozeBatchSize(imgSwitch);
|
||||
List<SimilarAsinResultRowDto> result = new ArrayList<>();
|
||||
for (int i = 0; i < items.size(); i += batchSize) {
|
||||
result.addAll(cozeClient.inspect(items.subList(i, Math.min(i + batchSize, items.size())), prompt, apiKey, imgSwitch));
|
||||
@@ -1553,6 +1553,11 @@ public class SimilarAsinTaskService {
|
||||
}
|
||||
}
|
||||
|
||||
private int resolveCozeBatchSize(boolean imgSwitch) {
|
||||
int configured = imgSwitch ? properties.getCozeBatchSize() : properties.getCozeTextOnlyBatchSize();
|
||||
return Math.max(1, configured);
|
||||
}
|
||||
|
||||
private void finalizeTask(FileTaskEntity task, String error, int rowCount, boolean assembleWorkbook) {
|
||||
String finalError = error;
|
||||
FileResultEntity result = null;
|
||||
@@ -1687,7 +1692,7 @@ public class SimilarAsinTaskService {
|
||||
.eq(TaskChunkEntity::getModuleType, MODULE_TYPE)
|
||||
.orderByAsc(TaskChunkEntity::getChunkIndex));
|
||||
Map<String, List<SimilarAsinParsedRowVo>> allRowsByBaseId = loadAllRowsByBaseId(task);
|
||||
int batchSize = Math.max(1, properties.getCozeBatchSize());
|
||||
int batchSize = resolveCozeBatchSize(readImgSwitch(task));
|
||||
int cozeWorkUnits = countCozeWorkUnits(chunks, batchSize);
|
||||
int totalProgressUnits = Math.max(3, cozeWorkUnits + 3);
|
||||
if (countPendingCozeStates(task.getId()) > 0) {
|
||||
@@ -1921,7 +1926,7 @@ public class SimilarAsinTaskService {
|
||||
String prompt = readAiPrompt(task);
|
||||
String apiKey = readApiKey(task);
|
||||
boolean imgSwitch = readImgSwitch(task);
|
||||
int batchSize = Math.max(1, properties.getCozeBatchSize());
|
||||
int batchSize = resolveCozeBatchSize(imgSwitch);
|
||||
// P1-1:检测到 720712008 风暴时强制把 batch 降到 1,隔离毒行;
|
||||
// 持续 5+ 次提交命中率 ≥ 40% 才会触发,正常波动不影响吞吐。
|
||||
if (isPoisonStormActive(task.getId())) {
|
||||
|
||||
Reference in New Issue
Block a user