Harden lease lifecycle durability
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"orchestra/internal/authz"
|
||||
"orchestra/internal/buildinfo"
|
||||
"orchestra/internal/domain"
|
||||
"orchestra/internal/provider"
|
||||
"orchestra/internal/store"
|
||||
@@ -51,6 +52,7 @@ type ProbeFunc func() (bool, string)
|
||||
type Server struct {
|
||||
Store *store.Store
|
||||
RouterReady bool
|
||||
Build buildinfo.Info
|
||||
Probes map[string]ProbeFunc
|
||||
Providers map[string]*provider.Supervisor
|
||||
}
|
||||
@@ -95,7 +97,7 @@ func (s *Server) Diagnostics(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
tasks := s.Store.Tasks()
|
||||
events := s.Store.Events(0)
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{"tasks": len(tasks), "events": len(events), "last_seq": func() uint64 {
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{"build": s.Build, "tasks": len(tasks), "events": len(events), "last_seq": func() uint64 {
|
||||
if len(events) == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user