Issue certificates sequential, allow changing the challenge concurrency

This commit is contained in:
Niklas Keller
2017-01-30 19:15:33 +01:00
parent 888588cf00
commit aa8186471c
2 changed files with 30 additions and 14 deletions

View File

@@ -82,7 +82,9 @@ class Issue implements Command {
$acme = $this->acmeFactory->build($server, $keyPair);
$errors = [];
$domainChunks = array_chunk($domains, 10, true);
$concurrency = $args->get("challenge-concurrency");
$domainChunks = array_chunk($domains, \min(20, \max($concurrency, 1)), true);
foreach ($domainChunks as $domainChunk) {
$promises = [];
@@ -251,6 +253,12 @@ class Issue implements Command {
"defaultValue" => 2048,
"castTo" => "int",
],
"challenge-concurrency" => [
"longPrefix" => "challenge-concurrency",
"description" => "Number of challenges to be solved concurrently.",
"defaultValue" => 10,
"castTo" => "int",
],
];
}
}