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

Method GetActiveTask

internal/taskmanager/manager.go:342–351  ·  view source on GitHub ↗
(vmid int)

Source from the content-addressed store, hash-verified

340}
341
342func (tm *TaskManager) GetActiveTask(vmid int) *Task {
343 tm.mu.RLock()
344 defer tm.mu.RUnlock()
345 for _, task := range tm.activeTasks {
346 if task.TargetVMID == vmid {
347 return cloneTask(task)
348 }
349 }
350 return nil
351}
352
353func (tm *TaskManager) GetActiveTaskForVM(node string, vmid int) *Task {
354 tm.mu.RLock()

Callers

nothing calls this directly

Calls 1

cloneTaskFunction · 0.85

Tested by

no test coverage detected