dev add check tokens for monitoring
Test Workflow / test (push) Successful in 4s

This commit is contained in:
vladp
2026-03-05 14:27:14 +07:00
parent 88e7121213
commit 3ed38dacd1
8 changed files with 262 additions and 14 deletions
@@ -90,10 +90,10 @@ public class ImageFoundRequestHandler implements RequestHandler {
allUniqueImages = searchImageService.removeDuplicateUrls(allYandexImages, allGoogleImages);
log.info("allUniqueImages OK: {} images", allUniqueImages.size());
if (!allUniqueImages.isEmpty()) {
tariffInfoService.writeOffTokens(fileEntity.getUserId(), TariffConstants.TOKEN_VALUE_FOR_SEARCH);
checkCounterService.incrementCheckCount(fileEntity.getUserId(), fileEntity.getMimeType());
}
// if (!allUniqueImages.isEmpty()) {
tariffInfoService.writeOffTokens(fileEntity.getUserId(), TariffConstants.TOKEN_VALUE_FOR_SEARCH);
checkCounterService.incrementCheckCount(fileEntity.getUserId(), fileEntity.getMimeType());
// }
int page = imageSearchRequest.getPage() != null ? imageSearchRequest.getPage() : 1;
int pageSize = 5;