Skip to content

Commit

Permalink
Merge pull request #1741 from alliance-genome/SCRUM-4608
Browse files Browse the repository at this point in the history
SCRUM-4608 Fix counts for disease annotation loads
  • Loading branch information
markquintontulloch authored Nov 25, 2024
2 parents 7ad5182 + 7b3e44f commit 968bd8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ public void execLoad(BulkLoadFileHistory bulkLoadFileHistory, Boolean cleanUp) {
bulkLoadFileHistory.getBulkLoadFile().setRecordCount(annotations.size() + bulkLoadFileHistory.getBulkLoadFile().getRecordCount());
bulkLoadFileDAO.merge(bulkLoadFileHistory.getBulkLoadFile());

bulkLoadFileHistory.setCount(annotations.size());
updateHistory(bulkLoadFileHistory);

boolean success = runLoad(agmDiseaseAnnotationService, bulkLoadFileHistory, dataProvider, annotations, annotationIdsLoaded);
String countType = "AGM Disease Annotations";
boolean success = runLoad(agmDiseaseAnnotationService, bulkLoadFileHistory, dataProvider, annotations, annotationIdsLoaded, countType);
if (success && cleanUp) {
runCleanup(diseaseAnnotationService, bulkLoadFileHistory, dataProvider.name(), annotationIdsBefore, annotationIdsLoaded, "AGM disease annotation");
runCleanup(diseaseAnnotationService, bulkLoadFileHistory, dataProvider.name(), annotationIdsBefore, annotationIdsLoaded, countType);
}
bulkLoadFileHistory.finishLoad();
updateHistory(bulkLoadFileHistory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,11 @@ public void execLoad(BulkLoadFileHistory bulkLoadFileHistory, Boolean cleanUp) {

bulkLoadFileHistory.getBulkLoadFile().setRecordCount(annotations.size() + bulkLoadFileHistory.getBulkLoadFile().getRecordCount());
bulkLoadFileDAO.merge(bulkLoadFileHistory.getBulkLoadFile());

bulkLoadFileHistory.setCount(annotations.size());

updateHistory(bulkLoadFileHistory);

boolean success = runLoad(alleleDiseaseAnnotationService, bulkLoadFileHistory, dataProvider, annotations, annotationIdsLoaded);
String countType = "Allele Disease Annotations";
boolean success = runLoad(alleleDiseaseAnnotationService, bulkLoadFileHistory, dataProvider, annotations, annotationIdsLoaded, countType);
if (success && cleanUp) {
runCleanup(diseaseAnnotationService, bulkLoadFileHistory, dataProvider.name(), annotationIdsBefore, annotationIdsLoaded, "allele disease annotation");
runCleanup(diseaseAnnotationService, bulkLoadFileHistory, dataProvider.name(), annotationIdsBefore, annotationIdsLoaded, countType);
}
bulkLoadFileHistory.finishLoad();
updateHistory(bulkLoadFileHistory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ public void execLoad(BulkLoadFileHistory bulkLoadFileHistory, Boolean cleanUp) {
bulkLoadFileHistory.getBulkLoadFile().setRecordCount(annotations.size() + bulkLoadFileHistory.getBulkLoadFile().getRecordCount());
bulkLoadFileDAO.merge(bulkLoadFileHistory.getBulkLoadFile());

bulkLoadFileHistory.setCount(annotations.size());
updateHistory(bulkLoadFileHistory);

boolean success = runLoad(geneDiseaseAnnotationService, bulkLoadFileHistory, dataProvider, annotations, annotationIdsLoaded);
String countType = "Gene Disease Annotations";
boolean success = runLoad(geneDiseaseAnnotationService, bulkLoadFileHistory, dataProvider, annotations, annotationIdsLoaded, countType);
if (success && cleanUp) {
runCleanup(diseaseAnnotationService, bulkLoadFileHistory, dataProvider.name(), annotationIdsBefore, annotationIdsLoaded, "gene disease annotation");
runCleanup(diseaseAnnotationService, bulkLoadFileHistory, dataProvider.name(), annotationIdsBefore, annotationIdsLoaded, countType);
}
bulkLoadFileHistory.finishLoad();
updateHistory(bulkLoadFileHistory);
Expand Down

0 comments on commit 968bd8f

Please sign in to comment.