refactor: route app usecase context lookup (#3896)

This commit is contained in:
Zhengchao An
2026-06-26 12:47:48 +08:00
committed by GitHub
parent 2301787afa
commit a038582325
6 changed files with 63 additions and 20 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ use super::storage_api::capacity::{
use super::storage_api::data_usage::{apply_bucket_usage_memory_overlay, load_data_usage_from_backend};
use super::storage_api::{ECStore, EndpointServerPools};
use crate::app::runtime_sources::{
AppContext, get_global_app_context, resolve_endpoints_handle, resolve_object_store_handle_for_context,
AppContext, current_app_context, resolve_endpoints_handle, resolve_object_store_handle_for_context,
};
use crate::capacity::resolve_admin_used_capacity;
use crate::cluster_snapshot::{ClusterReadOnlySnapshot, collect_cluster_read_only_snapshot};
@@ -181,7 +181,7 @@ impl DefaultAdminUsecase {
pub fn from_global() -> Self {
Self {
context: get_global_app_context(),
context: current_app_context(),
}
}