MCPcopy Create free account
hub / github.com/krau/SaveAny-Bot / snapshot

Method snapshot

api/progress.go:150–154  ·  view source on GitHub ↗

snapshot returns a point-in-time copy of the fields needed to render a response, so callers never touch the mutex directly.

()

Source from the content-addressed store, hash-verified

148// snapshot returns a point-in-time copy of the fields needed to render a
149// response, so callers never touch the mutex directly.
150func (t *TaskProgressInfo) snapshot() (status TaskStatus, total, downloaded int64, totalFiles, downloadedFiles int, startedAt time.Time, err string, updatedAt time.Time) {
151 t.mu.Lock()
152 defer t.mu.Unlock()
153 return t.Status, t.TotalBytes, t.DownloadedBytes, t.TotalFiles, t.DownloadedFiles, t.StartedAt, t.Error, t.UpdatedAt
154}
155
156// Emit implements taskevent.Sink. It translates task lifecycle events into
157// status/progress updates and fires the webhook on terminal transitions.

Calls

no outgoing calls

Tested by 1