This commit is contained in:
@@ -63,6 +63,7 @@ public class ImageFoundRequestHandler implements RequestHandler {
|
|||||||
log.info("searchResponseGoogle OK,{}", searchResponseGoogle);
|
log.info("searchResponseGoogle OK,{}", searchResponseGoogle);
|
||||||
allGoogleImages = searchImageService.getAllImagesWithoutPagination(
|
allGoogleImages = searchImageService.getAllImagesWithoutPagination(
|
||||||
searchResponseGoogle, "exact_matches");
|
searchResponseGoogle, "exact_matches");
|
||||||
|
|
||||||
} catch (TimeoutException e) {
|
} catch (TimeoutException e) {
|
||||||
log.warn("Google search timeout for file {}", fileId);
|
log.warn("Google search timeout for file {}", fileId);
|
||||||
hasTimeout = true;
|
hasTimeout = true;
|
||||||
@@ -70,7 +71,6 @@ public class ImageFoundRequestHandler implements RequestHandler {
|
|||||||
log.error("Google search failed for file {}", fileId, e);
|
log.error("Google search failed for file {}", fileId, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// /*
|
|
||||||
try {
|
try {
|
||||||
searchResponseYandex = searchImageService.searchReverseByPublicUrl(fileEntity, "yandex_reverse_image",
|
searchResponseYandex = searchImageService.searchReverseByPublicUrl(fileEntity, "yandex_reverse_image",
|
||||||
"visual_matches");
|
"visual_matches");
|
||||||
@@ -83,11 +83,10 @@ public class ImageFoundRequestHandler implements RequestHandler {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("Yandex search failed for file {}", fileId, e);
|
log.error("Yandex search failed for file {}", fileId, e);
|
||||||
}
|
}
|
||||||
// */
|
|
||||||
|
|
||||||
// allUniqueImages = searchImageService.removeDuplicateUrls(allYandexImages, allGoogleImages);
|
allUniqueImages = searchImageService.removeDuplicateUrls(allYandexImages, allGoogleImages);
|
||||||
// allUniqueImages = allGoogleImages;
|
// allUniqueImages = allGoogleImages;
|
||||||
allUniqueImages = allYandexImages;
|
// allUniqueImages = allYandexImages;
|
||||||
log.info("allUniqueImages OK: {} images", allUniqueImages.size());
|
log.info("allUniqueImages OK: {} images", allUniqueImages.size());
|
||||||
|
|
||||||
tariffInfoService.writeOffTokens(fileEntity.getUserId(), TariffConstants.TOKEN_VALUE_FOR_SEARCH);
|
tariffInfoService.writeOffTokens(fileEntity.getUserId(), TariffConstants.TOKEN_VALUE_FOR_SEARCH);
|
||||||
|
|||||||
Reference in New Issue
Block a user