mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +00:00
one context per goroutine
This commit is contained in:
parent
eb1d904f86
commit
d9f7689d27
1 changed files with 3 additions and 0 deletions
|
@ -497,6 +497,9 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli
|
|||
go func(offset int) {
|
||||
defer wg.Done()
|
||||
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
|
||||
j := offset + batchSize
|
||||
if j > len(ids) {
|
||||
j = len(ids)
|
||||
|
|
Loading…
Reference in a new issue