]> mj.ucw.cz Git - bex.git/commitdiff
prun: Added a switch for setting the number of parallel jobs
authorMartin Mares <mj@ucw.cz>
Thu, 16 Feb 2012 15:51:30 +0000 (16:51 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 16 Feb 2012 15:51:30 +0000 (16:51 +0100)
lib/bin/bex-prun

index 3fc36dd868ce5015850d82f90321a6dd6f94387b..9c37db5bfaeaab4c508a6e044ba6815d87599a3b 100755 (executable)
@@ -19,6 +19,7 @@ Usage: bex prun [<options>] [[!]<machine-or-class> ...]
 
 Options:
     --debug-children   Log stdout and stderr to ./debug.log
+-p, --parallel=<n>     Set limit on the number of jobs run in parallel
 -q, --queue=<name>     Run jobs in the given queue
     --text             Use plain-text user interface instead of curses
 AMEN
@@ -29,6 +30,7 @@ GetOptions(
        "q|queue=s" => \$queue_name,
        "text!" => \$text_mode,
        "debug-children!" => \$debug_children,
+       "j|parallel=i" => \$BEX::Config::max_parallel_jobs,
        "help" => \&usage,
 ) or die "Try `bex prun --help' for more information.\n";