Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/MODBULKOPS-334' into MODBULKOPS-334
Browse files Browse the repository at this point in the history
  • Loading branch information
obozhko-folio committed Oct 10, 2024
2 parents 8b492fd + dbb3696 commit e967bcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.UUID;
Expand Down Expand Up @@ -70,6 +71,7 @@ public void updateMarcRecords(BulkOperation bulkOperation) throws IOException {
bulkOperation.setLinkToCommittedRecordsMarcFile(null);
bulkOperation.setLinkToCommittedRecordsErrorsCsvFile(errorService.uploadErrorsToStorage(bulkOperation.getId()));
bulkOperation.setCommittedNumOfErrors(errorService.getCommittedNumOfErrors(bulkOperation.getId()));
bulkOperation.setEndTime(LocalDateTime.now());
bulkOperation.setStatus(bulkOperation.getCommittedNumOfErrors() == 0 ? COMPLETED : COMPLETED_WITH_ERRORS);
}
bulkOperationRepository.save(bulkOperation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ private void processDataImportResult(BulkOperation operation) {
errorService.saveErrorsFromDataImport(operation.getId(), dataImportJobExecution.getId());
operation.setLinkToCommittedRecordsErrorsCsvFile(errorService.uploadErrorsToStorage(operation.getId()));
operation.setCommittedNumOfErrors(errorService.getCommittedNumOfErrors(operation.getId()));
operation.setEndTime(LocalDateTime.now());
operation.setStatus(operation.getCommittedNumOfErrors() == 0 ? COMPLETED : COMPLETED_WITH_ERRORS);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public List<InstanceNoteType> getAllInstanceNoteTypes() {
public ContributorTypeCollection getContributorTypesByName(String name) {
return isNull(name) ?
new ContributorTypeCollection().contributorTypes(Collections.emptyList()).totalRecords(0) :
contributorTypesClient.getByQuery(String.format(QUERY_PATTERN_NAME, name), 1);
contributorTypesClient.getByQuery(String.format(QUERY_PATTERN_NAME, encode(name)), 1);
}

@Cacheable(cacheNames = "contributorTypesByCode")
Expand Down

0 comments on commit e967bcc

Please sign in to comment.