Skip to content

Commit

Permalink
BACKPORT: plugin: Fix event queue usage (#430)
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Kleinman <[email protected]>
  • Loading branch information
sharnoff and Sam Kleinman committed Jul 20, 2023
1 parent 3ff4973 commit 0d33520
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,13 @@ func makeAutoscaleEnforcerPlugin(

go func() {
for {
callback, err := queue.Wait(ctx)
callback, err := queue.Wait(ctx) // NB: Wait pulls from the front of the queue
if err != nil {
logger.Info("Stopped waiting on pod/VM queue", zap.Error(err))
break
}

callback()
queue.Remove()
}
}()

Expand Down

0 comments on commit 0d33520

Please sign in to comment.