-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue when retrying with stub (#5359)
Signed-off-by: jorgee <[email protected]> Signed-off-by: Paolo Di Tommaso <[email protected]> Co-authored-by: Paolo Di Tommaso <[email protected]>
- Loading branch information
1 parent
fb1c8b2
commit 324b611
Showing
6 changed files
with
98 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set -e | ||
|
||
echo '' | ||
$NXF_RUN -stub | tee stdout | ||
|
||
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process > stubtest'` == 1 ]] || false | ||
[[ `grep 'INFO' .nextflow.log | grep -c 'Re-submitted process > stubtest'` == 1 ]] || false | ||
|
||
[[ `grep -c 'Stubbing. Creating file' stdout` == 1 ]] || false | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
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() | ||
} |