From ac43e8a640b52cafe1ebaeca0f782dc4a862a744 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Mon, 30 Dec 2024 23:57:46 -0800 Subject: [PATCH] fix completed job status updates causing workers to reconnect (#3294) --- pkg/agent/worker.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/agent/worker.go b/pkg/agent/worker.go index 5952c2470..fefbe54dc 100644 --- a/pkg/agent/worker.go +++ b/pkg/agent/worker.go @@ -475,9 +475,13 @@ func (w *Worker) HandleAvailability(res *livekit.AvailabilityResponse) error { func (w *Worker) HandleUpdateJob(update *livekit.UpdateJobStatus) error { _, err := w.UpdateJobStatus(update) if err != nil { - w.logger.Infow("received job update for unknown job", "jobID", update.JobId) + // treating this as a debug message only + // this can happen if the Room closes first, which would delete the agent dispatch + // that would mark the job as successful. subsequent updates from the same worker + // would not be able to find the same jobID. + w.logger.Debugw("received job update for unknown job", "jobID", update.JobId) } - return err + return nil } func (w *Worker) UpdateJobStatus(update *livekit.UpdateJobStatus) (*livekit.JobState, error) {