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

Refresh the workDir if not empty. #58

Merged
merged 1 commit into from
Aug 21, 2023
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 @@ -509,7 +509,11 @@ class FloatGridExecutor extends AbstractGridExecutor {
log.debug "[float] task id: $taskId, nf-job-id: $job.nfJobID, " +
"float-job-id: $job.floatJobID, " +
"float status: $job.status, nf status: $st"
return st == QueueStatus.DONE || st == QueueStatus.ERROR
boolean finished = st == QueueStatus.DONE || st == QueueStatus.ERROR
if (finished) {
floatJobs.refreshWorkDir(job.nfJobID)
}
return finished
}

static private Map<String, QueueStatus> STATUS_MAP = [
Expand Down
11 changes: 9 additions & 2 deletions plugins/nf-float/src/main/com/memverge/nextflow/FloatJobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ class FloatJobs {
return job.status
}

def refreshWorkDir(String nfJobID) {
def workDir = nfJobID2workDir.get(nfJobID)
if (workDir) {
// call list files to update the folder cache
FileHelper.listDirectory(workDir)
}
}

@WithWriteLock
def updateOcStatus(String oc, String text) {
def stMap = FloatJob.parseJobMap(text)
Expand All @@ -96,8 +104,7 @@ class FloatJobs {
def workDir = nfJobID2workDir.get(job.nfJobID)
if (workDir) {
// check the availability of result files
// call list files to update the folder cache
FileHelper.listDirectory(workDir)
refreshWorkDir(job.nfJobID)
def files = ['.command.out', '.command.err', '.exitcode']
if (currentSt != Completed && job.status == Completed) {
for (filename in files) {
Expand Down