Re: Howto request multiple/parallel execs
Lincoln Peters <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Dec 28, 2010 at 7:11 AM, Steven Zedeck <[email protected]> wrote: > Hi, > > I’m using Cruisecontrol 2.8.4 under Linux. > > I need to execute multiple Perl scripts in parallel. Can this be done with > the exec tag in build.xml? I can’t seem to find online somewhere what is the > syntax of all the valid tags. As I understand it, each exec is executed in sequence, and if any one returns a bad exit code the build fails and the execs that follow it do not get called. If you want to run processes in parallel, you'll have to write your own script to handle it. The trickiest part would most likely be to detect bad exit codes. I don't know Perl very well, but if you have Python, you could do something like this: import sys import subprocess list_of_shell_commands = [...] scripts = [subprocess.Popen(cmd=x, shell=True) for x in list_of_shell_commands] sys.exit(sum([x.wait() for x in scripts])) -- Lincoln Peters <[email protected]> ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl