fix: race condition in worker waitgroup
This commit is contained in:
@@ -156,8 +156,8 @@ func (w *Worker) syncRelations(ctx context.Context) {
|
|||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
|
|
||||||
for range workerCount {
|
for range workerCount {
|
||||||
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
wg.Add(1)
|
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
for a := range jobs {
|
for a := range jobs {
|
||||||
w.syncSingleAnime(ctx, a.ID)
|
w.syncSingleAnime(ctx, a.ID)
|
||||||
|
|||||||
Reference in New Issue
Block a user