mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 12:20:56 +00:00
Bug 1849901: allow setting the maximum number of workers to use for taskgraph operations r=taskgraph-reviewers,jcristau
Differential Revision: https://phabricator.services.mozilla.com/D186726
This commit is contained in:
parent
d884c7959a
commit
2d14bcc45e
@ -203,7 +203,7 @@ def generate_taskgraph(options, parameters, logdir):
|
||||
return
|
||||
|
||||
futures = {}
|
||||
with ProcessPoolExecutor() as executor:
|
||||
with ProcessPoolExecutor(max_workers=options["max_workers"]) as executor:
|
||||
for spec in parameters:
|
||||
f = executor.submit(format_taskgraph, options, spec, logfile(spec))
|
||||
futures[f] = spec
|
||||
@ -347,6 +347,15 @@ def generate_taskgraph(options, parameters, logdir):
|
||||
"Without args the base revision will be used. A revision specifier such as "
|
||||
"the hash or `.~1` (hg) or `HEAD~1` (git) can be used as well.",
|
||||
)
|
||||
@argument(
|
||||
"-j",
|
||||
"--max-workers",
|
||||
dest="max_workers",
|
||||
default=None,
|
||||
type=int,
|
||||
help="The maximum number of workers to use for parallel operations such as"
|
||||
"when multiple parameters files are passed.",
|
||||
)
|
||||
def show_taskgraph(options):
|
||||
from mozversioncontrol import get_repository_object as get_repository
|
||||
from taskgraph.parameters import Parameters, parameters_loader
|
||||
|
Loading…
x
Reference in New Issue
Block a user