Run the merge queue on a state-driven coordinator

This commit is contained in:
Ian Gulliver
2026-10-21 11:28:07 -07:00
parent a971cce9d6
commit 7fbdf1669a
13 changed files with 509 additions and 561 deletions
+3
View File
@@ -363,6 +363,9 @@ func (m *Manager) warnLeadContext(ctx context.Context, l *live) error {
func (m *Manager) Observe(events []api.Event) {
batch := []api.Event{}
for _, ev := range events {
if ev.Seq != 0 {
m.poke()
}
if to, _ := ev.Payload["to"].(string); ev.Kind == "task.state" && readyState(api.TaskState(to)) && ev.TaskId != nil {
go m.promptReady(*ev.TaskId, ev.Payload["from"])
}