Skip to content

Commit

Permalink
Merge pull request #4417 from Kathrin-Huber/speed_up_migrationPage
Browse files Browse the repository at this point in the history
speed up migrationPage
  • Loading branch information
Kathrin-Huber authored May 20, 2021
2 parents 0043948 + 2d88500 commit 5b3a60e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void run() {
}
while (progress < processesList.size()) {
Process process = processService.getById(processesList.get(progress));
if (fileService.processOwnsAnchorXML(process, true) && !fileService.processOwnsYearXML(process, true)) {
if (fileService.processOwnsAnchorXML(process) && !fileService.processOwnsYearXML(process)) {
setWorkDetail(process.getTitle());
migrate(process);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,18 +562,7 @@ public void moveFile(URI sourceUri, URI targetUri) throws IOException {
* if Io failed
*/
public boolean processOwnsAnchorXML(Process process) throws IOException {
return processOwnsAnchorXML(process, false);
}

/**
* Process owns anchor XML.
*
* @param process whose metadata path to use
* @param forIndexingAll if method is triggerd from system/indexing page
* @return true if anchor file was found
*/
public boolean processOwnsAnchorXML(Process process, boolean forIndexingAll) throws IOException {
URI yearFile = createAnchorFile(getMetadataFilePath(process, false, forIndexingAll));
URI yearFile = createAnchorFile(getMetadataFilePath(process, false, true));
return fileExist(yearFile);
}

Expand All @@ -587,18 +576,7 @@ public boolean processOwnsAnchorXML(Process process, boolean forIndexingAll) thr
* if Io failed
*/
public boolean processOwnsYearXML(Process process) throws IOException {
return processOwnsYearXML(process, false);
}

/**
* Process owns year XML.
*
* @param process whose metadata path to use
* @param forIndexingAll if method is triggerd from system/indexing page
* @return true if year file was found
*/
public boolean processOwnsYearXML(Process process, boolean forIndexingAll) throws IOException {
URI yearFile = createYearFile(getMetadataFilePath(process, false, forIndexingAll));
URI yearFile = createYearFile(getMetadataFilePath(process, false, true));
return fileExist(yearFile);
}

Expand Down

0 comments on commit 5b3a60e

Please sign in to comment.