Skip to content

Commit bd24f79

Browse files
feat: change queuedUpgradeActions inside dispatchCancelActions to have values of struct{}
1 parent 6f75b29 commit bd24f79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/pkg/agent/application/dispatcher/dispatcher.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,13 @@ func (ad *ActionDispatcher) queueScheduledActions(input []fleetapi.Action, upgra
246246
// cancel actions are dispatched separately as they may remove items from the queue. If cancel actions remove upgrade actions
247247
// from the queue, upgradeDetailsNeedUpdate will be set to true.
248248
func (ad *ActionDispatcher) dispatchCancelActions(ctx context.Context, actions []fleetapi.Action, upgradeDetailsNeedUpdate *bool, acker acker.Acker) []fleetapi.Action {
249-
queuedUpgradeActions := maps.Collect(func(yield func(K string, V fleetapi.Action) bool) {
249+
queuedUpgradeActions := maps.Collect(func(yield func(K string, V struct{}) bool) {
250250
for _, action := range ad.queue.Actions() {
251251
if _, ok := action.(*fleetapi.ActionUpgrade); !ok {
252252
continue
253253
}
254254

255-
if !yield(action.ID(), action) {
255+
if !yield(action.ID(), struct{}{}) {
256256
return
257257
}
258258
}

0 commit comments

Comments
 (0)