Skip to content

Commit 2dbbbca

Browse files
committed
[push] process error on blacklist set
1 parent 593a26d commit 2dbbbca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/sms-gateway/modules/push/service.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,10 @@ func (s *Service) sendAll(ctx context.Context) {
166166
wrapper.retries++
167167

168168
if wrapper.retries >= maxRetries {
169-
s.blacklist.Set(token, struct{}{})
169+
if err := s.blacklist.Set(token, struct{}{}); err != nil {
170+
s.logger.Warn("Can't add to blacklist", zap.String("token", token), zap.Error(err))
171+
}
172+
170173
s.blacklistCounter.WithLabelValues(string(BlacklistOperationAdded)).Inc()
171174
s.retriesCounter.WithLabelValues(string(RetryOutcomeMaxAttempts)).Inc()
172175
s.logger.Warn("Retries exceeded, blacklisting token",

0 commit comments

Comments
 (0)