v0.2.12-pre.006

This commit is contained in:
2026-08-27 11:27:39 +02:00
parent a00e485ebb
commit 7d0fe8ac5f
16 changed files with 774 additions and 68 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-solprices-desk/src/app_state.rs
// version: 4
// version: 5
//! Shared backend state owned by the SOL Prices Desk Tauri application.
@@ -73,6 +73,19 @@ impl crate::AppState {
return self.market_price_runtime.refresh_one(provider_id).await;
}
/// Refreshes a selected provider set in deterministic request order and returns only safe updated rows/counts.
pub(crate) async fn refresh_market_prices(
&self,
request: crate::MarketPriceRefreshManyRequestDto,
) -> ksp_core_lib::Result<crate::MarketPriceRefreshResultDto> {
return self.market_price_runtime.refresh_many(request.into_provider_ids()).await;
}
/// Refreshes every configured provider in the deterministic order owned by Off-chain Transport.
pub(crate) async fn refresh_all_market_prices(&self) -> ksp_core_lib::Result<crate::MarketPriceRefreshResultDto> {
return self.market_price_runtime.refresh_all().await;
}
/// Builds the safe runtime status exposed by the SOL Prices Desk shell.
pub(crate) fn runtime_status(&self) -> ksp_core_lib::Result<crate::MarketPriceRuntimeStatusDto> {
let document_count = self.config_management.engine().registry().descriptors().count();
@@ -116,7 +129,7 @@ impl crate::AppState {
fallback_logging_active: runtime.fallback_active,
provider_count,
ready_provider_count,
shell_phase: "pre.005-single-refresh".to_owned(),
shell_phase: "pre.006-multi-refresh".to_owned(),
startup_diagnostic: runtime.startup_diagnostic.clone(),
unavailable_provider_count,
});