mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-22 22:35:27 +00:00
better variable name
This commit is contained in:
parent
34e050daad
commit
079cc9a5c5
1 changed files with 6 additions and 6 deletions
|
@ -387,7 +387,7 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli
|
|||
next := now.Add(domain.NotificationCheckInterval)
|
||||
|
||||
ids := make([]int64, maxNotificationChecks)
|
||||
numids := 0
|
||||
idslen := 0
|
||||
enqueued := 0
|
||||
skipped := 0
|
||||
|
||||
|
@ -420,7 +420,7 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli
|
|||
var id int64
|
||||
_ = rows.Scan(&id)
|
||||
ids[i] = id
|
||||
numids = i
|
||||
idslen = i
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
@ -430,17 +430,17 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli
|
|||
return
|
||||
}
|
||||
|
||||
if numids == 0 {
|
||||
if idslen == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
logger.Debug("enqueueing account batch", zap.Int("count", len(ids)), zap.Time("start", now))
|
||||
|
||||
// Split ids in batches
|
||||
for i := 0; i < numids; i += batchSize {
|
||||
for i := 0; i < idslen; i += batchSize {
|
||||
j := i + batchSize
|
||||
if j > numids {
|
||||
j = numids
|
||||
if j > idslen {
|
||||
j = idslen
|
||||
}
|
||||
batch := Int64Slice(ids[i:j])
|
||||
|
||||
|
|
Loading…
Reference in a new issue