Batch size should start with a bit over the threshold, just in case

pull/3393/head
David Núñez 2024-01-17 12:48:49 +01:00
parent 43df0adf7b
commit 30a39c59d8
No known key found for this signature in database
GPG Key ID: 53A9D83EF4C6332A
1 changed files with 2 additions and 1 deletions

View File

@ -67,10 +67,11 @@ class ThresholdDecryptionClient(ThresholdAccessControlClient):
self.log.warn(message)
raise self.ThresholdDecryptionRequestFailed(message)
batch_size = min(int(threshold * 1.25), len(encrypted_requests))
worker_pool = WorkerPool(
worker=worker,
value_factory=self.ThresholdDecryptionRequestFactory(
ursula_to_contact=list(encrypted_requests.keys()), threshold=threshold
ursulas_to_contact=list(encrypted_requests.keys()), threshold=batch_size
),
target_successes=threshold,
threadpool_size=len(