mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 00:18:42 +01:00
directly subscribe to item publisher in account crawlers
This commit is contained in:
committed by
Chris Eager
parent
77bf44fda5
commit
040f3190cb
@@ -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