use request context for LaunchJob api request (#2796)
* use request context for LaunchJob api request * one more
This commit is contained in:
@@ -104,7 +104,7 @@ func (s *RoomService) CreateRoom(ctx context.Context, req *livekit.CreateRoomReq
|
|||||||
defer done()
|
defer done()
|
||||||
|
|
||||||
if created {
|
if created {
|
||||||
go s.agentClient.LaunchJob(context.Background(), &agent.JobDescription{
|
go s.agentClient.LaunchJob(context.WithoutCancel(ctx), &agent.JobDescription{
|
||||||
JobType: livekit.JobType_JT_ROOM,
|
JobType: livekit.JobType_JT_ROOM,
|
||||||
Room: rm,
|
Room: rm,
|
||||||
})
|
})
|
||||||
@@ -314,7 +314,7 @@ func (s *RoomService) UpdateRoomMetadata(ctx context.Context, req *livekit.Updat
|
|||||||
}
|
}
|
||||||
|
|
||||||
if created {
|
if created {
|
||||||
go s.agentClient.LaunchJob(ctx, &agent.JobDescription{
|
go s.agentClient.LaunchJob(context.WithoutCancel(ctx), &agent.JobDescription{
|
||||||
JobType: livekit.JobType_JT_ROOM,
|
JobType: livekit.JobType_JT_ROOM,
|
||||||
Room: room,
|
Room: room,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user