mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-24 08:02:18 +02:00
Remove accidentally added file (#3304)
See discussion in [`1ab94d6`
(#3303)](1ab94d662b (r1473078205)
)
@qwerty287
This commit is contained in:
parent
ee56a6ad01
commit
e85762f791
@ -1,21 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"log"
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"go.woodpecker-ci.org/woodpecker/v2/server/queue" // replace with the actual import path
|
|
||||||
)
|
|
||||||
|
|
||||||
func GetQueueStats() {
|
|
||||||
http.HandleFunc("/api/queue/stats", func(w http.ResponseWriter, r *http.Request) {
|
|
||||||
var stats queue.InfoT
|
|
||||||
err := json.NewEncoder(w).Encode(stats)
|
|
||||||
if err != nil {
|
|
||||||
// handle the error
|
|
||||||
log.Printf("Error encoding JSON: %v", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user