refresh client

This commit is contained in:
Andre Medeiros 2021-07-12 17:10:10 -04:00
parent 3d41795636
commit 245c56eae0

View file

@ -267,6 +267,10 @@ func (c *Consumer) Consume(delivery rmq.Delivery) {
}).Error("failed to refresh reddit tokens")
return
}
// Refresh client
rac = c.reddit.NewAuthenticatedClient(tokens.RefreshToken, tokens.AccessToken)
err = c.pool.BeginFunc(ctx, func(tx pgx.Tx) error {
stmt := `
UPDATE accounts