mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 07:27:43 +00:00
be less noisy about rate limits
This commit is contained in:
parent
527552eb6d
commit
cc6e862ba6
2 changed files with 6 additions and 4 deletions
|
@ -255,7 +255,7 @@ func (nc *notificationsConsumer) Consume(delivery rmq.Delivery) {
|
|||
|
||||
if err != nil {
|
||||
switch err {
|
||||
case reddit.ErrTimeout: // Don't log timeouts
|
||||
case reddit.ErrTimeout, reddit.ErrRateLimited: // Don't log timeouts or rate limits
|
||||
break
|
||||
case reddit.ErrOauthRevoked:
|
||||
err = nc.deleteAccount(account)
|
||||
|
|
|
@ -152,9 +152,11 @@ func (snc *stuckNotificationsConsumer) Consume(delivery rmq.Delivery) {
|
|||
|
||||
things, err = rac.MessageInbox(snc)
|
||||
if err != nil {
|
||||
snc.logger.WithFields(logrus.Fields{
|
||||
"err": err,
|
||||
}).Error("failed to fetch last thing via inbox")
|
||||
if err != reddit.ErrRateLimited {
|
||||
snc.logger.WithFields(logrus.Fields{
|
||||
"err": err,
|
||||
}).Error("failed to fetch last thing via inbox")
|
||||
}
|
||||
return
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue