use request context for LaunchJob api request (#2796)

* use request context for LaunchJob api request

* one more
This commit is contained in:
Paul Wells
2024-06-16 21:16:29 -07:00
committed by GitHub
parent 88a340202a
commit 2bc101d323
+2 -2
View File
@@ -104,7 +104,7 @@ func (s *RoomService) CreateRoom(ctx context.Context, req *livekit.CreateRoomReq
defer done()
if created {
go s.agentClient.LaunchJob(context.Background(), &agent.JobDescription{
go s.agentClient.LaunchJob(context.WithoutCancel(ctx), &agent.JobDescription{
JobType: livekit.JobType_JT_ROOM,
Room: rm,
})
@@ -314,7 +314,7 @@ func (s *RoomService) UpdateRoomMetadata(ctx context.Context, req *livekit.Updat
}
if created {
go s.agentClient.LaunchJob(ctx, &agent.JobDescription{
go s.agentClient.LaunchJob(context.WithoutCancel(ctx), &agent.JobDescription{
JobType: livekit.JobType_JT_ROOM,
Room: room,
})