Skip to content

Commit

Permalink
remove double drain
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Dec 6, 2024
1 parent 482a30e commit 5ead65f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 6 additions & 1 deletion pkg/server/server_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ func (s *Server) processEnded(req *rpc.StartEgressRequest, info *livekit.EgressI

avgCPU, maxCPU, maxMemory := s.monitor.EgressEnded(req)
if maxCPU > 0 {
logger.Debugw("egress stats", "egressID", info.EgressId, "avgCPU", avgCPU, "maxCPU", maxCPU, "maxMemory", maxMemory)
logger.Debugw("egress metrics",
"egressID", info.EgressId,
"avgCPU", avgCPU,
"maxCPU", maxCPU,
"maxMemory", maxMemory,
)
}

s.ProcessFinished(info.EgressId)
Expand Down
3 changes: 1 addition & 2 deletions test/ioserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func (s *ioTestServer) UpdateEgress(_ context.Context, info *livekit.EgressInfo)
return &emptypb.Empty{}, nil
}

func (s *ioTestServer) UpdateMetrics(_ context.Context, req *rpc.UpdateMetricsRequest) (*emptypb.Empty, error) {
logger.Infow("egress metrics", "egressID", req.Info.EgressId, "avgCPU", req.AvgCpuUsage, "maxCPU", req.MaxCpuUsage)
func (s *ioTestServer) UpdateMetrics(_ context.Context, _ *rpc.UpdateMetricsRequest) (*emptypb.Empty, error) {
return &emptypb.Empty{}, nil
}
1 change: 0 additions & 1 deletion test/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ func (r *Runner) StartServer(t *testing.T, svc Server, bus psrpc.MessageBus, tem
r.room.Disconnect()
}
r.svc.Shutdown(false, true)
r.svc.Drain()
})

// connect to room
Expand Down

0 comments on commit 5ead65f

Please sign in to comment.