#91 -- fix api call
This commit is contained in:
parent
9cc721849c
commit
14e0266d0b
@ -13,7 +13,6 @@ 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;
|
||||||
@ -26,16 +25,13 @@ 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;
|
|
||||||
|
|
||||||
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
|
||||||
@ -73,7 +69,6 @@ public class IndexService {
|
|||||||
branch = branchService.findByBranchId(branch.getId()).orElseThrow(() -> new RuntimeException("Branch not found by id"));
|
branch = branchService.findByBranchId(branch.getId()).orElseThrow(() -> new RuntimeException("Branch not found by id"));
|
||||||
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));
|
||||||
scheduledTimeSeriesService.addTimeSeriesPoints();
|
|
||||||
LOG.debug("Complete indexing {} branch", branch.getName());
|
LOG.debug("Complete indexing {} branch", branch.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user