wire configured quota limits into routing
This commit is contained in:
@@ -42,6 +42,15 @@ func main() {
|
||||
log.Fatalf("load orchestra config: %v", err)
|
||||
}
|
||||
rt = &router.Router{Store: s, Registry: rr, Reachability: registry.TCPReachability{}, Timeout: time.Second, Retry: router.RetryPolicy{MaxAttempts: 3, Backoff: time.Minute}}
|
||||
limits := map[string]float64{}
|
||||
for _, h := range rr.Herdrs() {
|
||||
if h.QuotaLimit > 0 {
|
||||
limits[h.ID] = h.QuotaLimit
|
||||
}
|
||||
}
|
||||
if len(limits) > 0 {
|
||||
rt.Availability = router.QuotaAvailability{Store: s, Limits: limits, Window: 7 * 24 * time.Hour}
|
||||
}
|
||||
if repo, root := os.Getenv("ORCHESTRA_REPO"), os.Getenv("ORCHESTRA_WORKTREE_ROOT"); repo != "" && root != "" {
|
||||
adapters := map[string]herdr.Adapter{}
|
||||
for _, h := range rr.Herdrs() {
|
||||
|
||||
@@ -34,6 +34,7 @@ type Herdr struct {
|
||||
Protocol string `json:"protocol,omitempty"`
|
||||
Capabilities []string `json:"capabilities"`
|
||||
Concurrency int `json:"concurrency"`
|
||||
QuotaLimit float64 `json:"quota_limit,omitempty"`
|
||||
}
|
||||
type Config struct {
|
||||
Projects []Project `json:"projects"`
|
||||
|
||||
@@ -71,6 +71,8 @@ Rotation now honors an optional herdr turn-boundary probe (`pane.status`) before
|
||||
|
||||
Federation control-plane foundations now include worker registration, heartbeat updates, TTL-based offline status, and `/v1/federation/workers` plus per-worker heartbeat endpoints. Remote event/lease transport and remote worktree ownership remain to be layered on this registry.
|
||||
|
||||
Configured herdr `quota_limit` values are now wired into router availability using the rolling-window 80% conservative filter; previously the quota implementation existed but was not active in server routing.
|
||||
|
||||
Recommended order:
|
||||
|
||||
1. Add the orchestration coordinator: lease → worktree → harness session → bootstrap → lifecycle events.
|
||||
|
||||
Reference in New Issue
Block a user