0
0
mirror of https://github.com/signalapp/Signal-Server.git synced 2024-09-20 03:52:16 +02:00

De-idiom-ize a "wait for everything to finish" idiom

This commit is contained in:
Jon Chambers 2024-04-01 17:04:09 -04:00 committed by Jon Chambers
parent c4cbf0d618
commit f59c34004d

View File

@ -309,8 +309,7 @@ public abstract class SingleUsePreKeyStore<K extends PreKey<?>> {
))
.build())
.flatMap(deleteItemRequest -> Mono.fromFuture(() -> dynamoDbAsyncClient.deleteItem(deleteItemRequest)), DYNAMO_DB_MAX_BATCH_SIZE)
// Idiom: wait for everything to finish, but discard the results
.reduce(0, (a, b) -> 0)
.then()
.toFuture()
.thenRun(Util.NOOP);
}