Skip to content

Commit

Permalink
🐛 quota blocked tasks should be included in queued. (#745) (#746)
Browse files Browse the repository at this point in the history
https://issues.redhat.com/browse/MTA-3651

---------

Signed-off-by: Jeff Ortel <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>

Signed-off-by: Jeff Ortel <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>
Co-authored-by: Jeff Ortel <[email protected]>
  • Loading branch information
konveyor-ci-bot[bot] and jortel authored Aug 21, 2024
1 parent 7ddac1b commit 16c65e8
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions api/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand All @@ -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
}
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 16c65e8

Please sign in to comment.