mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 21:27:42 +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 {
|
if err != nil {
|
||||||
switch err {
|
switch err {
|
||||||
case reddit.ErrTimeout: // Don't log timeouts
|
case reddit.ErrTimeout, reddit.ErrRateLimited: // Don't log timeouts or rate limits
|
||||||
break
|
break
|
||||||
case reddit.ErrOauthRevoked:
|
case reddit.ErrOauthRevoked:
|
||||||
err = nc.deleteAccount(account)
|
err = nc.deleteAccount(account)
|
||||||
|
|
|
@ -152,9 +152,11 @@ func (snc *stuckNotificationsConsumer) Consume(delivery rmq.Delivery) {
|
||||||
|
|
||||||
things, err = rac.MessageInbox(snc)
|
things, err = rac.MessageInbox(snc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err != reddit.ErrRateLimited {
|
||||||
snc.logger.WithFields(logrus.Fields{
|
snc.logger.WithFields(logrus.Fields{
|
||||||
"err": err,
|
"err": err,
|
||||||
}).Error("failed to fetch last thing via inbox")
|
}).Error("failed to fetch last thing via inbox")
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue