diff options
Diffstat (limited to 'internal/api/server.go')
| -rw-r--r-- | internal/api/server.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/internal/api/server.go b/internal/api/server.go index 34e1872..11c9c15 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -451,21 +451,6 @@ func (s *Server) handleRunTask(w http.ResponseWriter, r *http.Request) { return } - // Enforce retry limit for non-initial runs (PENDING is the initial state). - if t.State != task.StatePending { - execs, err := s.store.ListExecutions(id) - if err != nil { - writeJSON(w, http.StatusInternalServerError, map[string]string{"error": "failed to count executions"}) - return - } - if t.Retry.MaxAttempts > 0 && len(execs) >= t.Retry.MaxAttempts { - writeJSON(w, http.StatusConflict, map[string]string{ - "error": fmt.Sprintf("retry limit reached (%d/%d attempts used)", len(execs), t.Retry.MaxAttempts), - }) - return - } - } - if err := s.store.UpdateTaskState(id, task.StateQueued); err != nil { writeJSON(w, http.StatusInternalServerError, map[string]string{"error": err.Error()}) return |
