* agents

* add test

* undo name changes

* remove debug logs

* fixes

* fix data race in test
This commit is contained in:
David Colburn
2023-11-03 11:43:35 -07:00
committed by GitHub
parent f5047ab653
commit 60374c6402
20 changed files with 931 additions and 91 deletions
+3 -1
View File
@@ -60,8 +60,10 @@ func (r *StandardRoomAllocator) CreateRoom(ctx context.Context, req *livekit.Cre
}()
// find existing room and update it
var created bool
rm, internal, err := r.roomStore.LoadRoom(ctx, livekit.RoomName(req.Name), true)
if err == ErrRoomNotFound {
created = true
rm = &livekit.Room{
Sid: utils.NewGuid(utils.RoomPrefix),
Name: req.Name,
@@ -114,7 +116,7 @@ func (r *StandardRoomAllocator) CreateRoom(ctx context.Context, req *livekit.Cre
return nil, false, routing.ErrNodeLimitReached
}
return rm, false, nil
return rm, created, nil
}
// select a new node