mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +00:00
fix error handling
This commit is contained in:
parent
3d8492e757
commit
9c70cee166
1 changed files with 2 additions and 2 deletions
|
@ -161,10 +161,10 @@ func enqueueAccounts(ctx context.Context, logger *logrus.Logger, pool *pgxpool.P
|
||||||
lockKey := fmt.Sprintf("locks:accounts:%s", payload)
|
lockKey := fmt.Sprintf("locks:accounts:%s", payload)
|
||||||
|
|
||||||
_, err := redisConn.Get(ctx, lockKey).Result()
|
_, err := redisConn.Get(ctx, lockKey).Result()
|
||||||
if err == nil || err == redis.Nil {
|
if err == nil {
|
||||||
skipped++
|
skipped++
|
||||||
continue
|
continue
|
||||||
} else {
|
} else if err != redis.Nil {
|
||||||
logger.WithFields(logrus.Fields{
|
logger.WithFields(logrus.Fields{
|
||||||
"lockKey": lockKey,
|
"lockKey": lockKey,
|
||||||
"err": err,
|
"err": err,
|
||||||
|
|
Loading…
Reference in a new issue