Review failed

This commit is contained in:
Ian Gulliver
2026-10-15 20:24:15 -07:00
parent 8cfe9de384
commit 2401c6fc93
4 changed files with 24 additions and 5 deletions
+6 -3
View File
@@ -18,6 +18,7 @@ import (
type snapRequest struct {
trigger api.SnapshotTrigger
seq int64
review bool
}
type snapState struct {
@@ -36,7 +37,7 @@ func (m *Manager) snapStateLocked(taskID string) *snapState {
return st
}
func (m *Manager) snapshotSoon(l *live, trigger api.SnapshotTrigger, seq int64) {
func (m *Manager) snapshotSoon(l *live, trigger api.SnapshotTrigger, seq int64, review bool) {
m.snapMu.Lock()
defer m.snapMu.Unlock()
@@ -44,7 +45,7 @@ func (m *Manager) snapshotSoon(l *live, trigger api.SnapshotTrigger, seq int64)
if st.closed {
return
}
req := &snapRequest{trigger: trigger, seq: seq}
req := &snapRequest{trigger: trigger, seq: seq, review: review}
if st.running {
st.pending = req
return
@@ -64,7 +65,9 @@ func (m *Manager) runSnapshots(l *live, st *snapState, req *snapRequest) {
if err != nil {
slog.Error("take snapshot", "task", l.taskID, "trigger", req.trigger, "err", err)
}
go m.afterSnapshot(snap)
if req.review {
go m.afterSnapshot(snap)
}
}
st.mu.Unlock()