修复缓存没有更新的问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m13s

This commit is contained in:
2026-05-11 10:38:52 +08:00
parent 97851c2595
commit a9eaf1d697
5 changed files with 145 additions and 31 deletions

View File

@@ -537,6 +537,7 @@ func (s *Service) AllocateCards(ctx context.Context, req *dto.AllocateStandalone
})
return nil, err
}
s.iotCardStore.InvalidateListCountCache(ctx)
// 通知轮询调度器状态变化(卡被分配后可能需要重新匹配配置)
if s.pollingCallback != nil && len(cardIDs) > 0 {
@@ -749,6 +750,7 @@ func (s *Service) RecallCards(ctx context.Context, req *dto.RecallStandaloneCard
})
return nil, err
}
s.iotCardStore.InvalidateListCountCache(ctx)
// 通知轮询调度器状态变化(卡被回收后可能需要重新匹配配置)
if s.pollingCallback != nil && len(cardIDs) > 0 {