feat(billing): finalize tenant subscription entitlements and platform stabilization fixes
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user