MCPcopy Create free account
hub / github.com/bytebase/bytebase / getActiveVCSUserCount

Method getActiveVCSUserCount

backend/api/v1/actuator_service.go:229–240  ·  view source on GitHub ↗
(ctx context.Context, workspaceID string)

Source from the content-addressed store, hash-verified

227}
228
229func (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
242func (s *ActuatorService) getUsedFeatures(ctx context.Context, workspaceID string) ([]v1pb.PlanFeature, error) {
243 var features []v1pb.PlanFeature

Callers 1

getServerInfoMethod · 0.95

Calls 2

GetMethod · 0.80

Tested by

no test coverage detected