Skip to content

Commit ca2ee08

Browse files
committed
EventLogService Update Status Changes
1 parent 3c6b75b commit ca2ee08

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Services/catalogapi/src/main/java/com/eshoponcontainers/catalogapi/services/CatalogIntegrationService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ public Mono<Void> saveEventAndCatalogChanges(IntegrationEvent event, CatalogItem
3535

3636
public Mono<Void> publishThroughEventBus(IntegrationEvent event) {
3737
System.out.println("publishThroughEventBus " +event);
38-
eventLogService.markEventAsInProgress(event.getId());
39-
eventBus.publish(event);
40-
eventLogService.markEventAsPublished(event.getId());
38+
eventLogService.markEventAsInProgress(event.getId()).then(eventBus.publish(event))
39+
.then(eventLogService.markEventAsPublished(event.getId()));
4140
return Mono.empty();
4241
}
4342

0 commit comments

Comments
 (0)