MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / GetAllTasks

Method GetAllTasks

internal/taskmanager/manager.go:359–373  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357}
358
359func (tm *TaskManager) GetAllTasks() []*Task {
360 tm.mu.RLock()
361 defer tm.mu.RUnlock()
362
363 var tasks []*Task
364 for _, t := range tm.activeTasks {
365 tasks = append(tasks, cloneTask(t))
366 }
367 for _, queue := range tm.queue {
368 for _, task := range queue {
369 tasks = append(tasks, cloneTask(task))
370 }
371 }
372 return tasks
373}
374
375func (tm *TaskManager) Stop() {
376 close(tm.stopChan)

Calls 1

cloneTaskFunction · 0.85