add building to general stats
This commit is contained in:
3
api.go
3
api.go
@@ -19,6 +19,7 @@ type StatsResponse struct {
|
||||
Skipped int `json:"skipped"`
|
||||
Latest int `json:"latest"`
|
||||
Queued int `json:"queued"`
|
||||
Building int `json:"building"`
|
||||
LastMirrorTimestamp *int64 `json:"last_mirror_timestamp,omitempty"`
|
||||
LTO *struct {
|
||||
Enabled int `json:"enabled"`
|
||||
@@ -73,6 +74,8 @@ func GetStats(w http.ResponseWriter, r *http.Request) {
|
||||
resp.Latest = c.Count
|
||||
case dbpackage.StatusQueued:
|
||||
resp.Queued = c.Count
|
||||
case dbpackage.StatusBuilding:
|
||||
resp.Building = c.Count
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -224,6 +224,11 @@ components:
|
||||
format: int64
|
||||
description: Number of packages currently in the build queue
|
||||
example: 5
|
||||
building:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Number of packages currently building
|
||||
example: 11
|
||||
last_mirror_timestamp:
|
||||
type: integer
|
||||
format: int64
|
||||
|
Reference in New Issue
Block a user