Skip to content

Commit

Permalink
Publishing hang
Browse files Browse the repository at this point in the history
  • Loading branch information
larousso committed Dec 8, 2023
1 parent 96ae107 commit f6083a9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void loadEventsUnpublishedWait() throws InterruptedException {
initDatas();
CompletionStage<java.util.List<EventEnvelope<VikingEvent, Void, Void>>> first = transactionSource().flatMapMany(t ->
Flux.from(postgresEventStore.loadEventsUnpublished(t, WAIT))
.concatMap(elt -> Flux.interval(Duration.ofMillis(100), Duration.ofMillis(100)).map(__ -> elt).take(1))
.concatMap(elt -> Mono.delay(Duration.ofMillis(120)).map(__ -> elt))
.concatMap(e -> Mono.fromCompletionStage(() -> postgresEventStore.markAsPublished(t, e).toCompletableFuture()).map(__ -> e))
.doFinally(it -> t.commit())
).collectList().toFuture();
Expand Down

0 comments on commit f6083a9

Please sign in to comment.