Harden lease lifecycle durability

This commit is contained in:
kami
2026-07-30 14:34:29 +04:00
parent 1ff0af2e69
commit f6ee0e3060
40 changed files with 2108 additions and 590 deletions
+3 -1
View File
@@ -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
}