Closed abhi18av closed 3 years ago
It's a very nice addition, thanks for your work on that @abhi18av! Will merge as it seems ok, maybe we should tweak the time, not sure! But let's see.
maybe we should tweak the time
The sleep will be between 1 - 10 seconds at random.
We could have also used shuf
as mentioned here https://blog.eduonix.com/shell-scripting/generating-random-numbers-in-linux-shell-scripting/
I went ahead with $RANDOM
since there was already some tested code with this in the BACTpipe one.
The sleep will be between 1 - 10 seconds at random. Yes, what I'm not certain is if 1-10 is time enough, how was your testing using it?
In my opinion using $RANDOM seems a good way to generating them so no problem with that.
I am adding a call to
sleep
process for each of the stubs to make them behave more like a real world workflow i.e. some processes complete earlier and send their output to the channel faster than others, this we can test thedataflow
aspect of nextflow.This idea I took from the issue which was highlighted in BACTpipe https://github.com/ctmrbio/BACTpipe/issues/170#issuecomment-863224237and was resolved using the
join
operator on channels.