forked from ungleich-public/cdist
		
	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', ))
 | 
			
		||||
# 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(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue