Release -j/--jobs option, i.e. make it non-beta
This commit is contained in:
parent
bd9884fac4
commit
0ab43e2405
3 changed files with 6 additions and 8 deletions
|
@ -11,7 +11,7 @@ import cdist.configuration
|
||||||
BETA_COMMANDS = set(('install', 'inventory', ))
|
BETA_COMMANDS = set(('install', 'inventory', ))
|
||||||
# set of beta arguments for sub-commands
|
# set of beta arguments for sub-commands
|
||||||
BETA_ARGS = {
|
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/"
|
EPILOG = "Get cdist at http://www.nico.schottelius.org/software/cdist/"
|
||||||
# Parser others can reuse
|
# Parser others can reuse
|
||||||
|
@ -191,8 +191,7 @@ def get_parsers():
|
||||||
name="positive int"),
|
name="positive int"),
|
||||||
help=('Operate in parallel in specified maximum number of jobs. '
|
help=('Operate in parallel in specified maximum number of jobs. '
|
||||||
'Global explorers, object prepare and object run are '
|
'Global explorers, object prepare and object run are '
|
||||||
'supported. Without argument CPU count is used by default. '
|
'supported. Without argument CPU count is used by default. '),
|
||||||
'Currently in beta.'),
|
|
||||||
action='store', dest='jobs',
|
action='store', dest='jobs',
|
||||||
const=multiprocessing.cpu_count())
|
const=multiprocessing.cpu_count())
|
||||||
parser['config_main'].add_argument(
|
parser['config_main'].add_argument(
|
||||||
|
|
|
@ -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
|
the number of jobs. This is enabled with :strong:`-j/--jobs` option where you
|
||||||
can specify the number of parallel jobs. By default,
|
can specify the number of parallel jobs. By default,
|
||||||
:strong:`multiprocessing.cpu_count()` is used. For this mode global explorers,
|
:strong:`multiprocessing.cpu_count()` is used. For this mode global explorers,
|
||||||
object preparation and object run are supported and this option is still in
|
object preparation and object run are supported.
|
||||||
:strong:`beta`.
|
|
||||||
|
|
||||||
You can, of course, use those two options together. This means that each host
|
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
|
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
|
# Configure hosts read from file hosts.file sequentially but using default
|
||||||
# number of parallel jobs
|
# 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
|
# Configure hosts read from file hosts.file in parallel using 16
|
||||||
# parallel jobs
|
# parallel jobs
|
||||||
$ cdist config -b -j 16 -p -f hosts.file
|
$ cdist config -j 16 -p -f hosts.file
|
||||||
|
|
||||||
|
|
||||||
Caveats
|
Caveats
|
||||||
|
|
|
@ -165,7 +165,7 @@ Install command is currently in beta.
|
||||||
Operate in parallel in specified maximum number of
|
Operate in parallel in specified maximum number of
|
||||||
jobs. Global explorers, object prepare and object run
|
jobs. Global explorers, object prepare and object run
|
||||||
are supported. Without argument CPU count is used by
|
are supported. Without argument CPU count is used by
|
||||||
default. Currently in beta.
|
default.
|
||||||
|
|
||||||
**-n, --dry-run**
|
**-n, --dry-run**
|
||||||
Do not execute code.
|
Do not execute code.
|
||||||
|
|
Loading…
Reference in a new issue