(ctx context.Context, workspaceID string)
| 227 | } |
| 228 | |
| 229 | func (s *ActuatorService) getActiveVCSUserCount(ctx context.Context, workspaceID string) (int, error) { |
| 230 | if count, ok := s.activeVCSUserCountSnapshot.Get(workspaceID); ok { |
| 231 | return count, nil |
| 232 | } |
| 233 | |
| 234 | count, err := s.store.CountActiveVCSProviderUsers(ctx, workspaceID, vcsProviderUserActiveWindow) |
| 235 | if err != nil { |
| 236 | return 0, err |
| 237 | } |
| 238 | s.activeVCSUserCountSnapshot.Add(workspaceID, count) |
| 239 | return count, nil |
| 240 | } |
| 241 | |
| 242 | func (s *ActuatorService) getUsedFeatures(ctx context.Context, workspaceID string) ([]v1pb.PlanFeature, error) { |
| 243 | var features []v1pb.PlanFeature |
no test coverage detected