MCPcopy
hub / github.com/dgraph-io/dgraph / GetOngoingTasks

Function GetOngoingTasks

worker/draft.go:238–251  ·  view source on GitHub ↗

GetOngoingTasks returns the list of ongoing tasks.

()

Source from the content-addressed store, hash-verified

236
237// GetOngoingTasks returns the list of ongoing tasks.
238func GetOngoingTasks() []string {
239 n := groups().Node
240 if n == nil {
241 return []string{}
242 }
243
244 n.opsLock.Lock()
245 defer n.opsLock.Unlock()
246 var tasks []string
247 for id := range n.ops {
248 tasks = append(tasks, id.String())
249 }
250 return tasks
251}
252
253// Now that we apply txn updates via Raft, waiting based on Txn timestamps is
254// sufficient. We don't need to wait for proposals to be applied.

Callers 2

HealthMethod · 0.92
ProcessRestoreRequestFunction · 0.85

Calls 4

groupsFunction · 0.85
LockMethod · 0.45
UnlockMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected