Resolve "Добавить логирование всех действий по индексации" #54

Merged
romanov73 merged 1 commits from 27-logs into master 2021-04-27 18:02:54 +04:00
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ public class AuthorService {
public Author findOrCreate(Author author) {
Optional<Author> newAuthor = authorRepository.findByName(author.getName()).stream().findAny();
if (newAuthor.isEmpty()) {
LOG.debug("Author {} was saved.", author);
LOG.debug("Author {} was saved.", author.getName());
return authorRepository.save(author);
}
return newAuthor.get();

View File

@ -58,6 +58,7 @@ public class GitRepositoryService {
private static final String BRANCH_PREFIX = "refs/remotes/origin/";
@Value("${extractor.custom-projects-dir}")
private String customProjectsDir;
private final ExecutorService executorService = Executors.newFixedThreadPool(4);
private final StructuralUnitService structuralUnitService;
@ -251,7 +252,6 @@ public class GitRepositoryService {
if (maybeFileName.isPresent()) {
fileChange = new FileChange();
fileChange.setFile(maybeFileName.get());
ExecutorService executorService = Executors.newFixedThreadPool(2);
Future<Boolean> futureEntity = executorService.submit(() -> {
return structuralUnitService.containsEntity(getContent(repository, commit, maybeFileName.get()));
});