mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(scheduledtask): fix deletedResource task (#19428)
Co-authored-by: 马鸿飞 <mahongfei@yunion.cn>
This commit is contained in:
@@ -442,6 +442,11 @@ func (st *SScheduledTask) Execute(ctx context.Context, userCred mcclient.TokenCr
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(res) == 0 {
|
||||
reason := fmt.Sprintf("All %ss %s failed:\n%s", st.ResourceType, st.Operation, errors.ErrNotFound)
|
||||
sa.Fail(reason)
|
||||
return nil
|
||||
}
|
||||
for id := range res {
|
||||
ids = append(ids, id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user