Skip to content

Commit

Permalink
MET-6199 enable ready condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jeortizquan committed Nov 5, 2024
1 parent 892138a commit e93dd6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -425,10 +426,10 @@ public List<LanguageView> getAllLanguages() {
@ResponseStatus(HttpStatus.OK)
public boolean processDeBias(@PathVariable("id") Integer datasetId) {
ProgressInfoDto progressInfoDto = reportService.getReport(datasetId.toString());
if (progressInfoDto.getStatus().equals(Status.COMPLETED) /*&&
if (progressInfoDto.getStatus().equals(Status.COMPLETED) &&
"READY".equals(Optional.ofNullable(debiasStateService.getDeBiasStatus(datasetId))
.map(DeBiasStatusDto::getState)
.orElse(""))*/) {
.map(DeBiasStatusDto::getState)
.orElse(""))) {
debiasStateService.cleanDeBiasReport(datasetId);
return debiasStateService.process(datasetId);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ private void updateProgress(List<Record> recordList) {
recordList.stream()
.collect(groupingBy(Record::getDatasetId))
.forEach((datasetId, records) -> {
LOGGER.info("========================Updating DeBias progress for datasetId: {}========================",
datasetId);
LOGGER.info("Updating DeBias record progress for datasetId: {}",datasetId);
records.forEach(recordToProcess ->
recordLogRepository.updateByRecordIdAndStepAndStatus(recordToProcess.getRecordId(), Step.DEBIAS,
Status.SUCCESS));
Expand Down

0 comments on commit e93dd6e

Please sign in to comment.