remove webhook queries in favor of using existing ones that ignore deleted webhooks, enforce not implemented for cloud users, get seats from license.features.users.
Этот коммит содержится в:
@@ -11240,22 +11240,6 @@ func (s *TimerLayerWebhookStore) GetIncomingListByUser(userID string, offset int
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerWebhookStore) GetIncomingTotal() (int64, error) {
|
||||
start := time.Now()
|
||||
|
||||
result, err := s.WebhookStore.GetIncomingTotal()
|
||||
|
||||
elapsed := float64(time.Since(start)) / float64(time.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if err == nil {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetIncomingTotal", success, elapsed)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerWebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, error) {
|
||||
start := time.Now()
|
||||
|
||||
@@ -11368,22 +11352,6 @@ func (s *TimerLayerWebhookStore) GetOutgoingListByUser(userID string, offset int
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerWebhookStore) GetOutgoingTotal() (int64, error) {
|
||||
start := time.Now()
|
||||
|
||||
result, err := s.WebhookStore.GetOutgoingTotal()
|
||||
|
||||
elapsed := float64(time.Since(start)) / float64(time.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if err == nil {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetOutgoingTotal", success, elapsed)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerWebhookStore) InvalidateWebhookCache(webhook string) {
|
||||
start := time.Now()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user