Files
ma/nextflow/tests-v1/stub-retry.nf
2026-04-29 23:01:54 +02:00

31 lines
392 B
Plaintext

process stubtest {
debug true
errorStrategy 'retry'
output:
path("*.txt")
script:
"""
echo "Not stubbing"
touch script.txt
"""
stub:
if( task.attempt < 2 ) {
"""
echo "Stubbing. Not creating file"
"""
} else {
"""
echo "Stubbing. Creating file"
touch script.txt
"""
}
}
workflow {
main:
stubtest()
}