MCPcopy Create free account
hub / github.com/cortexproject/cortex / iteration

Method iteration

pkg/util/users/active_user.go:137–143  ·  view source on GitHub ↗
(_ context.Context)

Source from the content-addressed store, hash-verified

135}
136
137func (s *ActiveUsersCleanupService) iteration(_ context.Context) error {
138 inactiveUsers := s.activeUsers.PurgeInactiveUsers(time.Now().Add(-s.inactiveTimeout).UnixNano())
139 for _, userID := range inactiveUsers {
140 s.cleanupFunc(userID)
141 }
142 return nil
143}
144
145func (s *ActiveUsersCleanupService) ActiveUsers() []string {
146 return s.activeUsers.ActiveUsers(time.Now().Add(-s.inactiveTimeout).UnixNano())

Callers

nothing calls this directly

Calls 2

PurgeInactiveUsersMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected