From 16c65e844321381920cb90227bfd4460223a5b2a Mon Sep 17 00:00:00 2001 From: "konveyor-ci-bot[bot]" <159171263+konveyor-ci-bot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:54:46 -0500 Subject: [PATCH] :bug: quota blocked tasks should be included in queued. (#745) (#746) https://issues.redhat.com/browse/MTA-3651 --------- Signed-off-by: Jeff Ortel Signed-off-by: Cherry Picker Signed-off-by: Jeff Ortel Signed-off-by: Cherry Picker Co-authored-by: Jeff Ortel --- api/task.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/api/task.go b/api/task.go index 886efa41a..74600e687 100644 --- a/api/task.go +++ b/api/task.go @@ -154,6 +154,7 @@ func (h TaskHandler) List(ctx *gin.Context) { qf.Token{Kind: qf.STRING, Value: tasking.Ready}, qf.Token{Kind: qf.STRING, Value: tasking.Postponed}, qf.Token{Kind: qf.STRING, Value: tasking.Pending}, + qf.Token{Kind: qf.STRING, Value: tasking.QuotaBlocked}, qf.Token{Kind: qf.STRING, Value: tasking.Running}) default: values = append(values, v) @@ -249,6 +250,7 @@ func (h TaskHandler) Queued(ctx *gin.Context) { tasking.Ready, tasking.Postponed, tasking.Pending, + tasking.QuotaBlocked, tasking.Running, }) db = db.Group("State") @@ -267,6 +269,8 @@ func (h TaskHandler) Queued(ctx *gin.Context) { r.Postponed = q.Count case tasking.Pending: r.Pending = q.Count + case tasking.QuotaBlocked: + r.QuotaBlocked = q.Count case tasking.Running: r.Running = q.Count } @@ -902,11 +906,12 @@ func (r *TaskReport) Model() (m *model.TaskReport) { // TaskQueue report. type TaskQueue struct { - Total int `json:"total"` - Ready int `json:"ready"` - Postponed int `json:"postponed"` - Pending int `json:"pending"` - Running int `json:"running"` + Total int `json:"total"` + Ready int `json:"ready"` + Postponed int `json:"postponed"` + QuotaBlocked int `json:"quotaBlocked"` + Pending int `json:"pending"` + Running int `json:"running"` } // TaskDashboard report.