mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +00:00
log info
This commit is contained in:
parent
4719ee091e
commit
c1f1d2a309
1 changed files with 4 additions and 2 deletions
|
@ -149,17 +149,19 @@ func enqueueAccounts(ctx context.Context, logger *logrus.Logger, pool *pgxpool.P
|
||||||
"count": len(ids),
|
"count": len(ids),
|
||||||
}).Debug("enqueueing account batch")
|
}).Debug("enqueueing account batch")
|
||||||
|
|
||||||
|
enqueued := 0
|
||||||
for _, id := range ids {
|
for _, id := range ids {
|
||||||
payload := fmt.Sprintf("%d", id)
|
payload := fmt.Sprintf("%d", id)
|
||||||
if redisConn.HGet(ctx, "locks:accounts", payload).Val() != "" {
|
if redisConn.HGet(ctx, "locks:accounts", payload).Val() != "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
enqueued++
|
||||||
_ = queue.Publish(payload)
|
_ = queue.Publish(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.WithFields(logrus.Fields{
|
logger.WithFields(logrus.Fields{
|
||||||
"count": len(ids),
|
"count": enqueued,
|
||||||
}).Debug("done enqueueing account batch")
|
}).Info("done enqueueing account batch")
|
||||||
}
|
}
|
||||||
|
|
||||||
func logErrors(errChan <-chan error) {
|
func logErrors(errChan <-chan error) {
|
||||||
|
|
Loading…
Reference in a new issue