summaryrefslogtreecommitdiffstats
path: root/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'command.py')
-rw-r--r--command.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/command.py b/command.py
index 4087cab5..b972a0be 100644
--- a/command.py
+++ b/command.py
@@ -24,6 +24,10 @@ from error import InvalidProjectGroupsError
24import progress 24import progress
25 25
26 26
27# Are we generating man-pages?
28GENERATE_MANPAGES = os.environ.get('_REPO_GENERATE_MANPAGES_') == ' indeed! '
29
30
27# Number of projects to submit to a single worker process at a time. 31# Number of projects to submit to a single worker process at a time.
28# This number represents a tradeoff between the overhead of IPC and finer 32# This number represents a tradeoff between the overhead of IPC and finer
29# grained opportunity for parallelism. This particular value was chosen by 33# grained opportunity for parallelism. This particular value was chosen by
@@ -122,10 +126,14 @@ class Command(object):
122 help='only show errors') 126 help='only show errors')
123 127
124 if self.PARALLEL_JOBS is not None: 128 if self.PARALLEL_JOBS is not None:
129 default = 'based on number of CPU cores'
130 if not GENERATE_MANPAGES:
131 # Only include active cpu count if we aren't generating man pages.
132 default = f'%default; {default}'
125 p.add_option( 133 p.add_option(
126 '-j', '--jobs', 134 '-j', '--jobs',
127 type=int, default=self.PARALLEL_JOBS, 135 type=int, default=self.PARALLEL_JOBS,
128 help='number of jobs to run in parallel (default: %s)' % self.PARALLEL_JOBS) 136 help=f'number of jobs to run in parallel (default: {default})')
129 137
130 def _Options(self, p): 138 def _Options(self, p):
131 """Initialize the option parser with subcommand-specific options.""" 139 """Initialize the option parser with subcommand-specific options."""