Skip to content

Commit 4773e58

Browse files
committed
Ensure that the onComplete block doesn't hang.
1 parent c4fb145 commit 4773e58

File tree

2 files changed

+26
-22
lines changed
  • subworkflows
    • local/utils_nfcore_rnaseq_pipeline
    • nf-core/utils_nfcore_pipeline

2 files changed

+26
-22
lines changed

subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,16 @@ workflow PIPELINE_COMPLETION {
116116
id, status -> pass_strand_check[id] = status
117117
}
118118

119+
// We need to ensure that the multiqc_report is a value channel (DataflowVariable).
120+
// Queue channels will not be available in the workflow.onComplete block.
121+
def multiqc_reports = multiqc_report.toList()
122+
119123
//
120124
// Completion email and summary
121125
//
122126
workflow.onComplete {
127+
assert multiqc_reports instanceof groovyx.gpars.dataflow.DataflowVariable : "Expected a value channel (DataflowVariable) for multiqc_reports inside workflow.onComplete block."
128+
123129
if (email || email_on_fail) {
124130
completionEmail(
125131
summary_params,
@@ -128,7 +134,7 @@ workflow PIPELINE_COMPLETION {
128134
plaintext_email,
129135
outdir,
130136
monochrome_logs,
131-
multiqc_report.toList()
137+
multiqc_reports.getVal(),
132138
)
133139
}
134140

subworkflows/nf-core/utils_nfcore_pipeline/main.nf

Lines changed: 19 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)