summaryrefslogtreecommitdiff
path: root/internal/executor
diff options
context:
space:
mode:
Diffstat (limited to 'internal/executor')
-rw-r--r--internal/executor/executor.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/executor/executor.go b/internal/executor/executor.go
index 9052bd7..b8979a1 100644
--- a/internal/executor/executor.go
+++ b/internal/executor/executor.go
@@ -626,6 +626,7 @@ type AgentStatusInfo struct {
ActiveTasks int `json:"active_tasks"`
RateLimited bool `json:"rate_limited"`
Until *time.Time `json:"until,omitempty"`
+ Drained bool `json:"drained"`
}
// AgentStatuses returns the current status of all registered agents.
@@ -638,6 +639,7 @@ func (p *Pool) AgentStatuses() []AgentStatusInfo {
info := AgentStatusInfo{
Agent: agent,
ActiveTasks: p.activePerAgent[agent],
+ Drained: p.drained[agent],
}
if deadline, ok := p.rateLimited[agent]; ok && now.Before(deadline) {
info.RateLimited = true