mirror of https://github.com/halo-dev/halo
Refine debug logs of querying extensions (#6414)
#### What type of PR is this? /kind cleanup /area core /milestone 2.18.x #### What this PR does / why we need it: This PR refines debug logs of listing all extensions. #### Does this PR introduce a user-facing change? ```release-note None ```pull/6417/head
parent
0407970664
commit
8e8599b3c7
|
@ -140,10 +140,10 @@ public class ReactiveExtensionClientImpl implements ReactiveExtensionClient {
|
||||||
final long startTimeMs = System.currentTimeMillis();
|
final long startTimeMs = System.currentTimeMillis();
|
||||||
return client.listByNames(storeNames)
|
return client.listByNames(storeNames)
|
||||||
.map(extensionStore -> converter.convertFrom(type, extensionStore))
|
.map(extensionStore -> converter.convertFrom(type, extensionStore))
|
||||||
.doOnNext(s -> {
|
.doOnComplete(() -> log.debug(
|
||||||
log.debug("Successfully retrieved all by names from db for {} in {}ms",
|
"Successfully retrieved all by names from db for {} in {}ms",
|
||||||
scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs);
|
scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs)
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,10 +161,10 @@ public class ReactiveExtensionClientImpl implements ReactiveExtensionClient {
|
||||||
final long startTimeMs = System.currentTimeMillis();
|
final long startTimeMs = System.currentTimeMillis();
|
||||||
return client.listByNames(storeNames)
|
return client.listByNames(storeNames)
|
||||||
.map(extensionStore -> converter.convertFrom(type, extensionStore))
|
.map(extensionStore -> converter.convertFrom(type, extensionStore))
|
||||||
.doOnNext(s -> {
|
.doOnComplete(() -> log.debug(
|
||||||
log.debug("Successfully retrieved by names from db for {} in {}ms",
|
"Successfully retrieved by names from db for {} in {}ms",
|
||||||
scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs);
|
scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs)
|
||||||
})
|
)
|
||||||
.collectList()
|
.collectList()
|
||||||
.map(result -> new ListResult<>(page.getPageNumber(), page.getPageSize(),
|
.map(result -> new ListResult<>(page.getPageNumber(), page.getPageSize(),
|
||||||
objectKeys.getTotal(), result));
|
objectKeys.getTotal(), result));
|
||||||
|
|
Loading…
Reference in New Issue