feat(billing): finalize tenant subscription entitlements and platform stabilization fixes
Some checks failed
ci / ui (push) Failing after 30s
images / build-and-push (push) Failing after 20s
ci / rust (push) Failing after 2m41s

This commit is contained in:
2026-03-30 21:46:26 +03:00
parent 2595e7f1c5
commit 63ca237178
8 changed files with 292 additions and 1250 deletions

View File

@@ -38,10 +38,9 @@ async fn serve() {
settings.shard_id.clone(),
));
spawn_health_probe(admin.clone(), settings.clone());
spawn_placement_watcher(admin.placement_manager(), settings.clone());
let storage = StorageClient::open(settings.storage_path.clone()).unwrap();
spawn_health_probe(admin.clone(), settings.clone(), storage.clone());
spawn_placement_watcher(admin.placement_manager(), settings.clone());
let stream = StreamClient::new(settings.nats_url.clone()).await.unwrap();
let _ = stream.setup_stream().await;
let executor = RuntimeExecutor::new();
@@ -115,10 +114,10 @@ fn load_settings() -> Settings {
Settings::from_env().unwrap_or_default()
}
fn spawn_health_probe(admin: Arc<AdminServer>, settings: Settings) {
fn spawn_health_probe(admin: Arc<AdminServer>, settings: Settings, storage: StorageClient) {
tokio::spawn(async move {
loop {
let storage_ok = StorageClient::open(settings.storage_path.clone()).is_ok();
let storage_ok = storage.check_health().is_ok();
admin.health_checker().set_storage_healthy(storage_ok);
let stream_ok = tokio::time::timeout(Duration::from_secs(1), async {