diff --git a/application/src/main/java/run/halo/app/extension/ReactiveExtensionClientImpl.java b/application/src/main/java/run/halo/app/extension/ReactiveExtensionClientImpl.java index 8c655ac0ab..5096bb1def 100644 --- a/application/src/main/java/run/halo/app/extension/ReactiveExtensionClientImpl.java +++ b/application/src/main/java/run/halo/app/extension/ReactiveExtensionClientImpl.java @@ -140,10 +140,10 @@ public Flux listAll(Class type, ListOptions options, final long startTimeMs = System.currentTimeMillis(); return client.listByNames(storeNames) .map(extensionStore -> converter.convertFrom(type, extensionStore)) - .doOnNext(s -> { - log.debug("Successfully retrieved all by names from db for {} in {}ms", - scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs); - }); + .doOnComplete(() -> log.debug( + "Successfully retrieved all by names from db for {} in {}ms", + scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs) + ); }); } @@ -161,10 +161,10 @@ public Mono> listBy(Class type, ListOptio final long startTimeMs = System.currentTimeMillis(); return client.listByNames(storeNames) .map(extensionStore -> converter.convertFrom(type, extensionStore)) - .doOnNext(s -> { - log.debug("Successfully retrieved by names from db for {} in {}ms", - scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs); - }) + .doOnComplete(() -> log.debug( + "Successfully retrieved by names from db for {} in {}ms", + scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs) + ) .collectList() .map(result -> new ListResult<>(page.getPageNumber(), page.getPageSize(), objectKeys.getTotal(), result));