diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-08 20:40:41 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-08 20:40:41 +0000 |
| commit | 7914153d3e65cec7a178e7454c9d4addbbbbdd3f (patch) | |
| tree | 88fca0d0204a69ffcb4249bf40f7f79f8000f31f /internal/api/executions.go | |
| parent | 417034be7f745062901a940d1a021f6d85be496e (diff) | |
api: extend executions and log streaming endpoints
- handleListRecentExecutions: add since/limit/task_id query params
- handleStreamLogs: tighten SSE framing and cleanup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/api/executions.go')
| -rw-r--r-- | internal/api/executions.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/api/executions.go b/internal/api/executions.go index d9214c0..114425e 100644 --- a/internal/api/executions.go +++ b/internal/api/executions.go @@ -21,12 +21,16 @@ func (s *Server) handleListRecentExecutions(w http.ResponseWriter, r *http.Reque } } + const maxLimit = 1000 limit := 50 if v := r.URL.Query().Get("limit"); v != "" { if n, err := strconv.Atoi(v); err == nil && n > 0 { limit = n } } + if limit > maxLimit { + limit = maxLimit + } taskID := r.URL.Query().Get("task_id") |
