Skip to content

Commit

Permalink
Improve api to enable wr executor
Browse files Browse the repository at this point in the history
Merges #1148
  • Loading branch information
pditommaso committed Jan 20, 2020
1 parent 87cdddc commit 21088ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -133,6 +133,10 @@ class BashWrapperBuilder {
return "NXF_SCRATCH=\"\$(set +u; nxf_mktemp $scratchStr)\""
}

protected boolean shouldUnstageOutputs() {
return workDir != targetDir
}

protected boolean fixOwnership() {
systemOsName == 'Linux' && containerConfig?.fixOwnership && runWithContainer && containerConfig.engine == 'docker' // <-- note: only for docker (shifter is not affected)
}
Expand Down Expand Up @@ -256,7 +260,7 @@ class BashWrapperBuilder {
binding.unstage_cmd = getUnstageCommand()
binding.unstage_controls = changeDir ? getUnstageControls() : null

if( changeDir || workDir != targetDir ) {
if( changeDir || shouldUnstageOutputs() ) {
binding.unstage_outputs = copyStrategy.getUnstageOutputFilesScript(outputFiles,targetDir)
}
else {
Expand Down
Expand Up @@ -654,5 +654,13 @@ class TaskPollingMonitor implements TaskMonitor {
log.debug "Failed to kill pending tasks ${batch} -- cause: ${e.message}"
}
}

/**
* The queue of tasks pending for submission to the underlying execution system
*/
protected Queue<TaskHandler> getPendingQueue() {
return pendingQueue
}

}

0 comments on commit 21088ad

Please sign in to comment.