From 277f975cee47000c97630f53bde69e363f9be1d5 Mon Sep 17 00:00:00 2001 From: Lehmann_Fabian Date: Mon, 2 Jun 2025 14:59:38 +0200 Subject: [PATCH] Allow to skip PublishDir Signed-off-by: Lehmann_Fabian --- .../nextflow/cws/processor/CWSTaskPollingMonitor.groovy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/nf-cws/src/main/nextflow/cws/processor/CWSTaskPollingMonitor.groovy b/plugins/nf-cws/src/main/nextflow/cws/processor/CWSTaskPollingMonitor.groovy index a908936..0b90850 100644 --- a/plugins/nf-cws/src/main/nextflow/cws/processor/CWSTaskPollingMonitor.groovy +++ b/plugins/nf-cws/src/main/nextflow/cws/processor/CWSTaskPollingMonitor.groovy @@ -66,6 +66,12 @@ class CWSTaskPollingMonitor extends TaskPollingMonitor { return pendingTasks } + private static removePublishDirIfSkipEnabled( TaskHandler handler ) { + if( handler.task.config.get('skipPublishDir') ) { + handler.task.config.put('publishDir', null) + } + } + private static void checkPublishDirMode(TaskHandler handler ) { def publishDirs = handler.task.config.get('publishDir') if ( publishDirs && publishDirs instanceof List ) { @@ -95,6 +101,7 @@ class CWSTaskPollingMonitor extends TaskPollingMonitor { OfflineLocalPath path = new WorkdirPath( workDir, attributes, workDir, helper ) handler.task.workDir = path } + removePublishDirIfSkipEnabled(handler) checkPublishDirMode(handler) super.finalizeTask(handler) helper?.validate()