Skip to content

Commit b6159eb

Browse files
committed
fixup! fix(agent): check agent metadata every second instead of minute
1 parent d3b79c6 commit b6159eb

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

agent/agent.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -335,32 +335,8 @@ func (a *agent) reportMetadataLoop(ctx context.Context) {
335335
a.logger.Error(ctx, "agent failed to report metadata", slog.Error(err))
336336
}
337337
}
338-
flushAllMetadata := func() {
339-
wg := sync.WaitGroup{}
340-
defer wg.Wait()
341-
for {
342-
select {
343-
case <-ctx.Done():
344-
return
345-
case mr := <-metadataResults:
346-
wg.Add(1)
347-
go func() {
348-
defer wg.Done()
349-
postMetadata(mr)
350-
}()
351-
continue
352-
default:
353-
return
354-
}
355-
}
356-
}
357338

358339
for {
359-
// Ensure all backpressured metadata is posted.
360-
if len(metadataResults) > 1 {
361-
flushAllMetadata()
362-
}
363-
364340
select {
365341
case <-ctx.Done():
366342
return

0 commit comments

Comments
 (0)