chore: log API key during worker registration (#4428)
This commit is contained in:
@@ -280,6 +280,10 @@ func (w *Worker) sendRequest(req *livekit.ServerMessage) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (w *Worker) APIKey() string {
|
||||||
|
return w.apiKey
|
||||||
|
}
|
||||||
|
|
||||||
func (w *Worker) Status() livekit.WorkerStatus {
|
func (w *Worker) Status() livekit.WorkerStatus {
|
||||||
w.mu.Lock()
|
w.mu.Lock()
|
||||||
defer w.mu.Unlock()
|
defer w.mu.Unlock()
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ func (h *AgentHandler) JobRequest(ctx context.Context, job *livekit.Job) (*rpc.J
|
|||||||
state, err := selected.AssignJob(ctx, job)
|
state, err := selected.AssignJob(ctx, job)
|
||||||
switch state.GetStatus() {
|
switch state.GetStatus() {
|
||||||
case livekit.JobStatus_JS_RUNNING:
|
case livekit.JobStatus_JS_RUNNING:
|
||||||
logger.Infow("assigned job to worker")
|
logger.Infow("assigned job to worker", "apiKey", selected.APIKey())
|
||||||
h.mu.Lock()
|
h.mu.Lock()
|
||||||
h.jobToWorker[livekit.JobID(job.Id)] = selected
|
h.jobToWorker[livekit.JobID(job.Id)] = selected
|
||||||
h.mu.Unlock()
|
h.mu.Unlock()
|
||||||
|
|||||||
Reference in New Issue
Block a user