Skip to content

Commit

Permalink
Fixes for removing titles
Browse files Browse the repository at this point in the history
  • Loading branch information
mdnoble73 committed May 6, 2024
1 parent 9a6e866 commit db50f5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Binary file modified code/palace_project_export/palace_project_export.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ private static void extractRecordsForPalaceProjectCollection(String collectionNa
}

//Set last indexed for the collection
if (!hadErrorsIndexing && doFullReload) {
if (!hadErrorsIndexing) {
try {
updateCollectionLastIndexedStmt.setLong(1, indexStartTime);
updateCollectionLastIndexedStmt.setLong(2, collection.id);
Expand All @@ -456,15 +456,17 @@ private static void extractRecordsForPalaceProjectCollection(String collectionNa
logEntry.incErrors("Error updating collection last indexed time", e);
}

//Remove availability for anything that we didn't see during this run
try {
getTitlesToRemoveFromCollectionStmt.setLong(1, collection.id);
ResultSet titlesToRemoveFromCollectionRS = getTitlesToRemoveFromCollectionStmt.executeQuery();
while (titlesToRemoveFromCollectionRS.next()) {
removePalaceProjectTitleFromCollection(titlesToRemoveFromCollectionRS.getLong("id"), titlesToRemoveFromCollectionRS.getLong("titleId"));
if (doFullReload) {
//Remove availability for anything that we didn't see during this run
try {
getTitlesToRemoveFromCollectionStmt.setLong(1, collection.id);
ResultSet titlesToRemoveFromCollectionRS = getTitlesToRemoveFromCollectionStmt.executeQuery();
while (titlesToRemoveFromCollectionRS.next()) {
removePalaceProjectTitleFromCollection(titlesToRemoveFromCollectionRS.getLong("id"), titlesToRemoveFromCollectionRS.getLong("titleId"));
}
} catch (Exception e) {
logEntry.incErrors("Unable to remove titles from collection after indexing", e);
}
}catch (Exception e) {
logEntry.incErrors("Unable to remove titles from collection after indexing", e);
}
}
}
Expand Down

0 comments on commit db50f5c

Please sign in to comment.