Skip to content

Commit

Permalink
Merge branch 'hotfix/UV_Core_v2.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
eea03 committed Jun 30, 2015
2 parents 25453df + c620e03 commit 98d84eb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ public boolean postAction(PipelineExecution execution,
Map<Node, Context> contexts,
DependencyGraph graph) {
LOG.debug("CleanUp start .. ");

try {
this.relationalRepositoryManager.release(execution.getContext().getExecutionId());
} catch (Exception e) {
LOG.error("Failed to release relational repository", e);
}

// first release contexts
for (Context item : contexts.values()) {
if (execution.isDebugging()) {
Expand Down Expand Up @@ -93,12 +100,6 @@ public boolean postAction(PipelineExecution execution,
}
}

try {
this.relationalRepositoryManager.release(execution.getContext().getExecutionId());
} catch (Exception e) {
LOG.error("Failed to release relational repository", e);
}

// prepare execution root
File rootDir = new File(
appConfig.getString(ConfigProperty.GENERAL_WORKINGDIR));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,17 @@ public void release() throws Exception {

private void deleteDatabaseFile() throws IOException {
Pattern filesPattern = Pattern.compile(this.databaseFileName + ".*");
if (this.dataunitDirectory == null || !this.dataunitDirectory.exists()) {
return;
}
File[] filesInDataUnitDir = this.dataunitDirectory.listFiles();
if (filesInDataUnitDir == null) {
return;
}
for (File file : filesInDataUnitDir) {
if (filesPattern.matcher(file.getName()).matches()) {
Files.delete(file.toPath());
}
break;
}
}

Expand Down

0 comments on commit 98d84eb

Please sign in to comment.