Skip to content

Commit

Permalink
iam:fix role add async task.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljl committed Nov 17, 2023
1 parent 8918bd3 commit 0c085b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions support/iam/src/console_interface/api/iam_ci_role_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ impl IamCiRoleApi {
) -> TardisApiResult<Option<String>> {
add_remote_ip(request, &ctx.0).await?;
let ctx = ctx.0;
let apps_split: Vec<&str> = app_ids.0.split(',').collect::<Vec<_>>();
let account_split: Vec<&str> = account_ids.0.split(',').collect::<Vec<_>>();
let ctx_clone = ctx.clone();
ctx.add_async_task(Box::new(|| {
Box::pin(async move {
let task_handle = tokio::spawn(async move {
let funs = iam_constants::get_tardis_inst();
let apps_split: Vec<&str> = app_ids.0.split(',').collect::<Vec<_>>();
let account_split: Vec<&str> = account_ids.0.split(',').collect::<Vec<_>>();
for app_id in apps_split {
let mock_app_ctx = IamCertServ::try_use_app_ctx(ctx_clone.clone(), Some(app_id.to_string())).unwrap_or(ctx_clone.clone());
for account_id in account_split.clone() {
Expand Down

0 comments on commit 0c085b4

Please sign in to comment.