Compare commits
No commits in common. "ba747cfed3cfe26d9ab9ab7725e1d94e7cf93a51" and "9d5672cdcf06054df77af702f270d15cb0f1bbef" have entirely different histories.
ba747cfed3
...
9d5672cdcf
@ -18,11 +18,12 @@ import ru.ulstu.extractor.branch.service.BranchService;
|
|||||||
import ru.ulstu.extractor.commit.model.Commit;
|
import ru.ulstu.extractor.commit.model.Commit;
|
||||||
import ru.ulstu.extractor.gitrepository.model.GitRepository;
|
import ru.ulstu.extractor.gitrepository.model.GitRepository;
|
||||||
import ru.ulstu.extractor.ts.creator.db.DBTimeSeriesCreator;
|
import ru.ulstu.extractor.ts.creator.db.DBTimeSeriesCreator;
|
||||||
import ru.ulstu.extractor.ts.service.ScheduledTimeSeriesService;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class IndexService {
|
public class IndexService {
|
||||||
@ -31,16 +32,14 @@ public class IndexService {
|
|||||||
private final GitRepositoryService gitRepositoryService;
|
private final GitRepositoryService gitRepositoryService;
|
||||||
private final BranchService branchService;
|
private final BranchService branchService;
|
||||||
private final List<DBTimeSeriesCreator> timeSeriesCreators;
|
private final List<DBTimeSeriesCreator> timeSeriesCreators;
|
||||||
private final ScheduledTimeSeriesService scheduledTimeSeriesService;
|
private final static ExecutorService EXECUTOR = Executors.newFixedThreadPool(10);
|
||||||
|
|
||||||
public IndexService(GitRepositoryService gitRepositoryService,
|
public IndexService(GitRepositoryService gitRepositoryService,
|
||||||
BranchService branchService,
|
BranchService branchService,
|
||||||
List<DBTimeSeriesCreator> timeSeriesCreators,
|
List<DBTimeSeriesCreator> timeSeriesCreators) {
|
||||||
ScheduledTimeSeriesService scheduledTimeSeriesService) {
|
|
||||||
this.gitRepositoryService = gitRepositoryService;
|
this.gitRepositoryService = gitRepositoryService;
|
||||||
this.branchService = branchService;
|
this.branchService = branchService;
|
||||||
this.timeSeriesCreators = timeSeriesCreators;
|
this.timeSeriesCreators = timeSeriesCreators;
|
||||||
this.scheduledTimeSeriesService = scheduledTimeSeriesService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@ -79,7 +78,6 @@ public class IndexService {
|
|||||||
final Branch branchForSave = branchService.updateStatus(branch, IndexingStatus.FINISHED);
|
final Branch branchForSave = branchService.updateStatus(branch, IndexingStatus.FINISHED);
|
||||||
timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(branchForSave));
|
timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(branchForSave));
|
||||||
LOG.debug("Complete indexing {} branch", branch.getName());
|
LOG.debug("Complete indexing {} branch", branch.getName());
|
||||||
scheduledTimeSeriesService.addTimeSeriesPoints();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
Loading…
Reference in New Issue
Block a user