This commit is contained in:
@@ -60,10 +60,13 @@ public class GlobalSearchAsyncProcessor {
|
||||
try {
|
||||
for (int i = 0; i < filesToProcess.size(); i++) {
|
||||
String uuid = filesToProcess.get(i);
|
||||
FileEntity file = fileEntityRepository.findById(uuid)
|
||||
.orElseThrow(() -> new RuntimeException("File not found: " + uuid));
|
||||
log.info("UUID: " + uuid);
|
||||
FileEntity file = fileEntityRepository.findById(uuid).orElse(null);
|
||||
|
||||
tariffInfoService.writeOffTokens(userId, TariffConstants.TOKEN_VALUE_FOR_SEARCH, OperationType.GLOBAL_SEARCH);
|
||||
if (file == null) continue;
|
||||
|
||||
tariffInfoService.writeOffTokens(userId, TariffConstants.TOKEN_VALUE_FOR_SEARCH,
|
||||
OperationType.GLOBAL_SEARCH);
|
||||
GlobalSearchResult result = processFile(file, taskId, userId);
|
||||
globalSearchResultRepository.save(result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user