mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 13:56:47 +00:00
directly subscribe to item publisher in account crawlers
This commit is contained in:
1 parent
77bf44fda5
commit
de049b547e
1 file changed
+1
-5
@@ -1253,11 +1253,7 @@ public class Accounts {
|
||||
.totalSegments(segments)
|
||||
.build());
|
||||
|
||||
// Subscribe to the publisher of responses (i.e. `scanPublisher`) rather than the publisher of items
|
||||
// (i.e. `scanPublisher.items()`) to work around https://github.com/aws/aws-sdk-java-v2/issues/6411
|
||||
return Flux.from(scanPublisher)
|
||||
.flatMap(scanResponse -> Flux.fromIterable(scanResponse.items()))
|
||||
.map(Accounts::fromItem);
|
||||
return Flux.from(scanPublisher.items()).map(Accounts::fromItem);
|
||||
})
|
||||
.sequential();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user