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
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user