Add metrics for mobile versions snapshots (#28191)
* Add metrics for mobile versions snapshots * Add notifications disabled and fix lint * Address feedback * Verify all references to JobTypeActiveUsers * Fix typos * Improve platform values * Add test and MySQL support
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d45a54a8e9
Коммит
040838b056
@@ -9938,6 +9938,27 @@ func (s *RetryLayerSessionStore) GetLRUSessions(c request.CTX, userID string, li
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerSessionStore) GetMobileSessionMetadata() ([]*model.MobileSessionMetadata, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.SessionStore.GetMobileSessionMetadata()
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
timepkg.Sleep(100 * timepkg.Millisecond)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerSessionStore) GetSessions(c request.CTX, userID string) ([]*model.Session, error) {
|
||||
|
||||
tries := 0
|
||||
|
||||
Ссылка в новой задаче
Block a user