Queue Enable
All checks were successful
/ release (push) Successful in 42s

This commit is contained in:
Samuel Lorch 2024-07-06 18:01:51 +02:00
parent 77d7a8624c
commit b03e85db0b
7 changed files with 77 additions and 2 deletions

View file

@ -16,8 +16,10 @@ type IndexData struct {
}
type IndexWorker struct {
ID string
Worker
Status *types.WorkerStatus
Status *types.WorkerStatus
QueueEnable bool
}
func handleIndex(w http.ResponseWriter, r *http.Request) {
@ -39,11 +41,13 @@ func handleIndex(w http.ResponseWriter, r *http.Request) {
}
slog.InfoContext(r.Context(), "Got Worker Status", "id", i, "status", status)
data.Workers = append(data.Workers, IndexWorker{
ID: i,
Worker: *Workers[i],
Status: &status,
})
} else {
data.Workers = append(data.Workers, IndexWorker{
ID: i,
Worker: *Workers[i],
Status: nil,
})