Run the merge queue on a state-driven coordinator
This commit is contained in:
@@ -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"])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user