Switch to stdlib maps, slices (#4445)
* Switch to stdlib maps, slices * slices
This commit is contained in:
@@ -4,14 +4,15 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
"maps"
|
||||
"math"
|
||||
"math/rand/v2"
|
||||
"slices"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/frostbyte73/core"
|
||||
"github.com/gammazero/deque"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/agent"
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
@@ -423,7 +424,7 @@ func (w *AgentWorker) SimulateRoomJob(roomName string) {
|
||||
func (w *AgentWorker) Jobs() []*AgentJob {
|
||||
w.mu.Lock()
|
||||
defer w.mu.Unlock()
|
||||
return maps.Values(w.jobs)
|
||||
return slices.Collect(maps.Values(w.jobs))
|
||||
}
|
||||
|
||||
type stableJobLoad struct {
|
||||
|
||||
Reference in New Issue
Block a user