Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions internal/handler/agentic_probe_batch_21.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package handler

import (
"context"
"net/http"

"golang.org/x/sync/semaphore"
)

func AgenticProbeBatch21(w http.ResponseWriter, r *http.Request) error {
sem := semaphore.NewWeighted(1)
if err := sem.Acquire(context.Background(), 1); err != nil {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[agentic-review] [MEDIUM / HIGH] Prefer request-scoped context over context.Background() in request paths.

return err
}
if err := sem.Acquire(context.Background(), 1); err != nil {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[agentic-review] [MEDIUM / HIGH] Prefer request-scoped context over context.Background() in request paths.

return nil
}
return nil
}