Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed up migrationPage #4417

Merged
merged 2 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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