dev delete config
Test Workflow / test (push) Waiting to run

This commit is contained in:
vladp
2026-02-16 19:43:12 +07:00
parent d4f9397dff
commit ba802ca53f
@@ -61,11 +61,19 @@ public class ImageFoundRequestHandler implements RequestHandler {
String searchResponseYandex;
String searchResponseGoogle;
List<YandexSearchResponse.ImageResult> allUniqueImages;
try {
searchResponseYandex = searchImageService.searchReverseByPublicUrl(fileEntity, "yandex_reverse_image",
"visual_matches");
List<YandexSearchResponse.ImageResult> allYandexImages = searchImageService.getAllImagesWithoutPagination(
searchResponseYandex, "visual_matches");
searchResponseGoogle = searchImageService.searchReverseByPublicUrl(fileEntity, "google_lens",
"exact_matches");
List<YandexSearchResponse.ImageResult> allGoogleImages = searchImageService.getAllImagesWithoutPagination(
searchResponseGoogle, "exact_matches");
allUniqueImages = searchImageService.removeDuplicateUrls(allYandexImages,
allGoogleImages);
} catch (TimeoutException e) {
log.warn("Search timeout for file {}, returning empty results", fileId);
return new BaseResponse(request.getMsgId(), MessageCode.SUCCESS.getCode(),
@@ -85,14 +93,6 @@ public class ImageFoundRequestHandler implements RequestHandler {
checkCounterService.incrementCheckCount(fileEntity.getUserId(), fileEntity.getMimeType());
List<YandexSearchResponse.ImageResult> allYandexImages = searchImageService.getAllImagesWithoutPagination(
searchResponseYandex, "visual_matches");
List<YandexSearchResponse.ImageResult> allGoogleImages = searchImageService.getAllImagesWithoutPagination(
searchResponseGoogle, "exact_matches");
List<YandexSearchResponse.ImageResult> allUniqueImages = searchImageService.removeDuplicateUrls(allYandexImages,
allGoogleImages);
int page = imageSearchRequest.getPage() != null ? imageSearchRequest.getPage() : 1;
int pageSize = 5;