From 0ab43e24055e00324e18852356f8e2b85637df94 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Sat, 13 Apr 2019 21:18:27 +0200 Subject: [PATCH] Release -j/--jobs option, i.e. make it non-beta --- cdist/argparse.py | 5 ++--- docs/src/cdist-parallelization.rst | 7 +++---- docs/src/man1/cdist.rst | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cdist/argparse.py b/cdist/argparse.py index 72fc0d0f..3ebdc138 100644 --- a/cdist/argparse.py +++ b/cdist/argparse.py @@ -11,7 +11,7 @@ import cdist.configuration BETA_COMMANDS = set(('install', 'inventory', )) # set of beta arguments for sub-commands BETA_ARGS = { - 'config': set(('jobs', 'tag', 'all_tagged_hosts', 'use_archiving', )), + 'config': set(('tag', 'all_tagged_hosts', 'use_archiving', )), } EPILOG = "Get cdist at http://www.nico.schottelius.org/software/cdist/" # Parser others can reuse @@ -191,8 +191,7 @@ def get_parsers(): name="positive int"), help=('Operate in parallel in specified maximum number of jobs. ' 'Global explorers, object prepare and object run are ' - 'supported. Without argument CPU count is used by default. ' - 'Currently in beta.'), + 'supported. Without argument CPU count is used by default. '), action='store', dest='jobs', const=multiprocessing.cpu_count()) parser['config_main'].add_argument( diff --git a/docs/src/cdist-parallelization.rst b/docs/src/cdist-parallelization.rst index ed3afae9..d458a128 100644 --- a/docs/src/cdist-parallelization.rst +++ b/docs/src/cdist-parallelization.rst @@ -12,8 +12,7 @@ The other way is to operate in parallel within one host where you specify the number of jobs. This is enabled with :strong:`-j/--jobs` option where you can specify the number of parallel jobs. By default, :strong:`multiprocessing.cpu_count()` is used. For this mode global explorers, -object preparation and object run are supported and this option is still in -:strong:`beta`. +object preparation and object run are supported. You can, of course, use those two options together. This means that each host will be processed by its own process. Within each process cdist will operate @@ -32,11 +31,11 @@ Examples # Configure hosts read from file hosts.file sequentially but using default # number of parallel jobs - $ cdist config -b -j -f hosts.file + $ cdist config -j -f hosts.file # Configure hosts read from file hosts.file in parallel using 16 # parallel jobs - $ cdist config -b -j 16 -p -f hosts.file + $ cdist config -j 16 -p -f hosts.file Caveats diff --git a/docs/src/man1/cdist.rst b/docs/src/man1/cdist.rst index 2eb0ce00..30832f2f 100644 --- a/docs/src/man1/cdist.rst +++ b/docs/src/man1/cdist.rst @@ -165,7 +165,7 @@ Install command is currently in beta. Operate in parallel in specified maximum number of jobs. Global explorers, object prepare and object run are supported. Without argument CPU count is used by - default. Currently in beta. + default. **-n, --dry-run** Do not execute code.