parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: callback on joblog


From: Rob Sargent
Subject: Re: callback on joblog
Date: Fri, 25 Jul 2014 09:42:03 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

On 07/25/2014 06:27 AM, Ole Tange wrote:
On Wed, Jul 23, 2014 at 10:02 PM, Rob Sargent <robjsargent@gmail.com> wrote:
I would like to react to each job's completion. I need to accumulate the
data from each run and decide whether or not it's worth while to continue
with the remaining jobs. I don't think pipe is what I want, but maybe I'm
misunderstanding that feature. Given that parallel is writing joblog (which
I love,btw) I'm wondering if anything could be plugged in there?
Can you make a wrapper like this:

doit() {
   process $1
   analyze output $1
   if good; then
      return 0
   else
      return 1
   fi
}
export -f doit

parallel --halt 1 doit ::: args

If not, please elaborate.


/Ole
Thanks, yes that might be an option though much must conveyed in "$1".  I'm currently trying a java alternative on this same theme, the meat of which may morph into "analyze output".

Cheers,
rjs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]