Skip to content

Commit

Permalink
iam:fix spi config stats tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljl committed Jun 26, 2024
1 parent d3933d0 commit 136ce89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl IamStatsClient {
}),
ext: None,
};
SpiStatsClient::fact_record_load(&funs.conf::<IamConfig>().spi.kv_orgs_prefix.clone(), &org_id, add_req, funs, ctx).await?;
SpiStatsClient::fact_record_load(&funs.conf::<IamConfig>().spi.stats_orgs_prefix.clone(), &org_id, add_req, funs, ctx).await?;
Ok(())
}

Expand All @@ -126,7 +126,7 @@ impl IamStatsClient {
}

pub async fn org_fact_record_remove(org_id: String, funs: &TardisFunsInst, ctx: &TardisContext) -> TardisResult<()> {
SpiStatsClient::fact_record_delete(&funs.conf::<IamConfig>().spi.kv_orgs_prefix.clone(), &org_id, funs, ctx).await?;
SpiStatsClient::fact_record_delete(&funs.conf::<IamConfig>().spi.stats_orgs_prefix.clone(), &org_id, funs, ctx).await?;
Ok(())
}
}
2 changes: 2 additions & 0 deletions backend/supports/iam/src/iam_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ pub struct IamSpiConfig {
pub search_url: String,
pub log_url: String,
pub search_account_tag: String,
pub stats_orgs_prefix: String,
pub kv_url: String,
pub kv_tenant_prefix: String,
pub kv_account_prefix: String,
Expand All @@ -125,6 +126,7 @@ impl Default for IamSpiConfig {
search_url: "http://127.0.0.1:8080/spi-search".to_string(),
log_url: "http://127.0.0.1:8080/spi-log".to_string(),
search_account_tag: "iam_account".to_string(),
stats_orgs_prefix: "iam_orgs".to_string(),
kv_url: "http://127.0.0.1:8080/spi-kv".to_string(),
kv_tenant_prefix: "iam_tenant".to_string(),
kv_account_prefix: "iam_account".to_string(),
Expand Down

0 comments on commit 136ce89

Please sign in to comment.