fix(gateway): persist quota refresh from strong catalog reads

This commit is contained in:
ZheFox
2026-09-03 13:16:40 +08:00
parent 76fb8905c9
commit 40a5e1470d
4 changed files with 163 additions and 11 deletions
@@ -213,6 +213,21 @@ impl GatewayDataState {
self
}
#[cfg(test)]
pub(crate) fn with_cached_provider_catalog_reader_for_tests<T>(
mut self,
repository: Arc<T>,
) -> Self
where
T: ProviderCatalogReadRepository + 'static,
{
let inner: Arc<dyn ProviderCatalogReadRepository> = repository;
self.provider_catalog_reader = Some(Arc::new(
super::provider_catalog_cache::CachedProviderCatalogReadRepository::new(inner),
));
self
}
#[cfg(test)]
pub(crate) fn with_request_candidate_reader(
mut self,