mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 07:27:43 +00:00
remove retry logic with token
This commit is contained in:
parent
0262133ce8
commit
fdfa447435
1 changed files with 0 additions and 10 deletions
|
@ -196,9 +196,6 @@ func (nc *notificationsConsumer) Consume(delivery rmq.Delivery) {
|
|||
return
|
||||
}
|
||||
|
||||
retried := false
|
||||
|
||||
refreshToken:
|
||||
rac := nc.reddit.NewAuthenticatedClient(account.RefreshToken, account.AccessToken)
|
||||
if account.ExpiresAt < int64(now) {
|
||||
nc.logger.WithFields(logrus.Fields{
|
||||
|
@ -251,13 +248,6 @@ refreshToken:
|
|||
msgs, err := rac.MessageInbox(account.LastMessageID)
|
||||
|
||||
if err != nil {
|
||||
// Check if maybe we need to refresh the token.
|
||||
if !retried {
|
||||
retried = true
|
||||
account.ExpiresAt = 0
|
||||
goto refreshToken
|
||||
}
|
||||
|
||||
nc.logger.WithFields(logrus.Fields{
|
||||
"accountID": id,
|
||||
"err": err,
|
||||
|
|
Loading…
Reference in a new issue