mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 23:47:44 +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)
|
next := now.Add(domain.NotificationCheckInterval)
|
||||||
|
|
||||||
ids := make([]int64, maxNotificationChecks)
|
ids := make([]int64, maxNotificationChecks)
|
||||||
numids := 0
|
idslen := 0
|
||||||
enqueued := 0
|
enqueued := 0
|
||||||
skipped := 0
|
skipped := 0
|
||||||
|
|
||||||
|
@ -420,7 +420,7 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli
|
||||||
var id int64
|
var id int64
|
||||||
_ = rows.Scan(&id)
|
_ = rows.Scan(&id)
|
||||||
ids[i] = id
|
ids[i] = id
|
||||||
numids = i
|
idslen = i
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
@ -430,17 +430,17 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if numids == 0 {
|
if idslen == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Debug("enqueueing account batch", zap.Int("count", len(ids)), zap.Time("start", now))
|
logger.Debug("enqueueing account batch", zap.Int("count", len(ids)), zap.Time("start", now))
|
||||||
|
|
||||||
// Split ids in batches
|
// Split ids in batches
|
||||||
for i := 0; i < numids; i += batchSize {
|
for i := 0; i < idslen; i += batchSize {
|
||||||
j := i + batchSize
|
j := i + batchSize
|
||||||
if j > numids {
|
if j > idslen {
|
||||||
j = numids
|
j = idslen
|
||||||
}
|
}
|
||||||
batch := Int64Slice(ids[i:j])
|
batch := Int64Slice(ids[i:j])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue