diff --git a/src/main/java/org/folio/search/service/reindex/jdbc/ReindexStatusRepository.java b/src/main/java/org/folio/search/service/reindex/jdbc/ReindexStatusRepository.java index ea33dce99..b97776cf8 100644 --- a/src/main/java/org/folio/search/service/reindex/jdbc/ReindexStatusRepository.java +++ b/src/main/java/org/folio/search/service/reindex/jdbc/ReindexStatusRepository.java @@ -1,7 +1,6 @@ package org.folio.search.service.reindex.jdbc; import static org.folio.search.model.reindex.ReindexStatusEntity.END_TIME_MERGE_COLUMN; -import static org.folio.search.model.reindex.ReindexStatusEntity.END_TIME_UPLOAD_COLUMN; import static org.folio.search.model.reindex.ReindexStatusEntity.START_TIME_MERGE_COLUMN; import static org.folio.search.model.reindex.ReindexStatusEntity.STATUS_COLUMN; import static org.folio.search.model.reindex.ReindexStatusEntity.TOTAL_MERGE_RANGES_COLUMN; @@ -60,20 +59,13 @@ public void setMergeReindexStarted(ReindexEntityType entityType, int totalMergeR jdbcTemplate.update(sql, totalMergeRanges, Timestamp.from(Instant.now()), entityType.name()); } - public void setReindexUploadFailed(ReindexEntityType entityType) { - var fullTableName = getFullTableName(context, REINDEX_STATUS_TABLE); - var sql = UPDATE_SQL.formatted(fullTableName, "%s = ?".formatted(END_TIME_UPLOAD_COLUMN)); - - jdbcTemplate.update(sql, ReindexStatus.UPLOAD_FAILED.name(), Timestamp.from(Instant.now()), entityType.name()); - } - public void setReindexMergeFailed(List entityTypes) { var inTypes = entityTypes.stream() .map(entityType -> "'%s'".formatted(entityType.name())) .collect(Collectors.joining(",")); var fullTableName = getFullTableName(context, REINDEX_STATUS_TABLE); var sql = UPDATE_FOR_ENTITIES_SQL.formatted( - fullTableName, "%s = ?, %s = ?".formatted(STATUS_COLUMN, END_TIME_MERGE_COLUMN)); + fullTableName, "%s = '?', %s = ?".formatted(STATUS_COLUMN, END_TIME_MERGE_COLUMN)); log.info("inTypes: {}", inTypes); log.info("sql: {}", sql);