Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions policy/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,11 @@ func (m *Manager) Run(ctx context.Context, evalCh chan<- *sdk.ScalingEvaluation)
// Start the metrics reporter.
go m.periodicMetricsReporter(ctx, m.metricsInterval)

// Create a separate context so we can stop the goroutine monitoring the
// list of policies independently from the parent context.
monitorCtx, cancel := context.WithCancel(ctx)
defer cancel()

for {
// Create a separate context so we can stop the goroutine monitoring the
// list of policies independently from the parent context.
monitorCtx, cancel := context.WithCancel(ctx)
defer cancel()

// Start the policy source and listen for changes in the list of policy IDs
for _, s := range m.policySources {
Expand Down
Loading