diff options
Diffstat (limited to 'internal/api/executions.go')
| -rw-r--r-- | internal/api/executions.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/api/executions.go b/internal/api/executions.go index 4d8ba9c..d39de9f 100644 --- a/internal/api/executions.go +++ b/internal/api/executions.go @@ -128,6 +128,14 @@ func (s *Server) handleGetAgentStatus(w http.ResponseWriter, r *http.Request) { }) } +// handleUndrainAgent resets the drain state and failure counter for the given agent type. +// POST /api/pool/agents/{agent}/undrain +func (s *Server) handleUndrainAgent(w http.ResponseWriter, r *http.Request) { + agent := r.PathValue("agent") + s.pool.UndrainingAgent(agent) + w.WriteHeader(http.StatusOK) +} + // tailLogFile reads the last n lines from the file at path. func tailLogFile(path string, n int) (string, error) { data, err := os.ReadFile(path) |
