Only fetch last-resort PQ keys for accounts with linked devices

This commit is contained in:
Jon Chambers 2025-04-28 16:50:44 -04:00 committed by Jon Chambers
parent cdb651b68f
commit 26b3b75054
1 changed files with 1 additions and 0 deletions

View File

@ -76,6 +76,7 @@ public class RemoveLinkedDevicesWithoutPqKeysCommand extends AbstractSinglePassC
final KeysManager keysManager = getCommandDependencies().keysManager(); final KeysManager keysManager = getCommandDependencies().keysManager();
accounts accounts
.filter(account -> account.getDevices().size() > 1)
.flatMap( .flatMap(
account -> Mono.fromFuture(() -> keysManager.getPqEnabledDevices(account.getIdentifier(IdentityType.ACI))) account -> Mono.fromFuture(() -> keysManager.getPqEnabledDevices(account.getIdentifier(IdentityType.ACI)))
.retryWhen(Retry.backoff(maxRetries, Duration.ofSeconds(1)) .retryWhen(Retry.backoff(maxRetries, Duration.ofSeconds(1))