MCPcopy Index your code
hub / github.com/flant/shell-operator / GetSnapshot

Method GetSnapshot

pkg/task/queue/task_queue.go:1080–1082  ·  view source on GitHub ↗

GetSnapshot returns a copy of all tasks in the queue. This is useful for external iteration or processing without holding locks. The returned slice is a snapshot at the time of the call and will not reflect subsequent changes to the queue.

()

Source from the content-addressed store, hash-verified

1078// The returned slice is a snapshot at the time of the call and will not reflect
1079// subsequent changes to the queue.
1080func (q *TaskQueue) GetSnapshot() []task.Task {
1081 return q.storage.GetSnapshot()
1082}
1083
1084// DeleteFunc runs fn on every task and removes each task for which fn returns false.
1085func (q *TaskQueue) DeleteFunc(fn func(task.Task) bool) {

Calls

no outgoing calls