mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-11-30 01:06:50 +00:00
Use Mono.fromFuture(() ->) instead of Mono.fromFuture() to defer
evaluation
This commit is contained in:
1 parent
607c839dda
commit
4410da5fb2
1 file changed
+1
-1
+1
-1
@@ -129,7 +129,7 @@ public class FoundationDbMessageStream implements MessageStream {
|
||||
final List<Database> databases = Arrays.stream(databasesByEpoch).filter(Objects::nonNull).distinct().toList();
|
||||
|
||||
return Flux.fromIterable(databases)
|
||||
.flatMap(database -> Mono.fromFuture(getEndOfQueueKeyExclusive(database))
|
||||
.flatMap(database -> Mono.fromFuture(() -> getEndOfQueueKeyExclusive(database))
|
||||
.map(maybeEndOfQueueKeyExclusive -> Tuples.of(database, maybeEndOfQueueKeyExclusive)))
|
||||
.collectMap(Tuple2::getT1, Tuple2::getT2)
|
||||
.flatMapMany(endOfQueueKeysByDatabase -> {
|
||||
|
||||
Reference in new issue
Block a user