Is it possible to set a -halt condition (or multiple -halt conditions?) such that all jobs will be halted if any of them fail, regardless of the exit code?
I want to monitor for an event (that I just triggered, separately, on a load balanced service). I can identify if the event passed or failed by viewing the logs, but I have to view logs on multiple servers at once. Perfect! Parallel it! I have an extra requirement though: I want to return success or failure based on the log result.
So I want to stop the parallel jobs if any of them detect the event (i.e. "-halt now"
) but I don't know if the detect will return zero or non-zero (that's the point: I'm trying to find out that information) so neither "--halt now,success=1"
nor "--halt now,fail=1"
is correct, I need to figure out a way to do something like "--halt now,any=1"
)
I did a look through the source and, well, my perl Kung-fu is inadequate to tackle this (and it looks like exitstatus is used in many different places in the source, so it's difficult for me to figure out if this would be feasible or not.)
Note that ,success=1
and ,fail=1
both work perfectly (given the corresponding exit status) but I don't know if it will be success or fail before I run parallel.