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:
parent
c4cbf0d618
commit
f59c34004d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user