mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 19:57:43 +00:00
use .Err to invoke the command
This commit is contained in:
parent
f956033e2d
commit
abf8823cf1
1 changed files with 3 additions and 1 deletions
|
@ -182,7 +182,9 @@ func NewConsumer(tag int, logger *logrus.Logger, statsd *statsd.Client, redis *r
|
||||||
func (c *Consumer) Consume(delivery rmq.Delivery) {
|
func (c *Consumer) Consume(delivery rmq.Delivery) {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
defer c.redis.HDel(ctx, "locks:accounts", delivery.Payload())
|
defer func() {
|
||||||
|
c.redis.HDel(ctx, "locks:accounts", delivery.Payload()).Err()
|
||||||
|
}()
|
||||||
|
|
||||||
c.logger.WithFields(logrus.Fields{
|
c.logger.WithFields(logrus.Fields{
|
||||||
"accountID": delivery.Payload(),
|
"accountID": delivery.Payload(),
|
||||||
|
|
Loading…
Reference in a new issue