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

Method ProcessResult

pkg/task/queue/task_storage.go:251–268  ·  view source on GitHub ↗
(taskRes TaskResult, t task.Task)

Source from the content-addressed store, hash-verified

249}
250
251func (ts *TaskStorage) ProcessResult(taskRes TaskResult, t task.Task) {
252 ts.mu.Lock()
253 defer ts.mu.Unlock()
254
255 // Add after tasks
256 ts.addAfter(t.GetId(), taskRes.GetAfterTasks()...)
257
258 // Remove the current task if successful
259 if taskRes.Status == Success {
260 ts.remove(t.GetId())
261 }
262
263 // Add head tasks
264 ts.addFirst(taskRes.GetHeadTasks()...)
265
266 // Add tail tasks to the end
267 ts.addLast(taskRes.GetTailTasks()...)
268}

Callers 4

processOneMethod · 0.80

Calls 8

addAfterMethod · 0.95
removeMethod · 0.95
addFirstMethod · 0.95
addLastMethod · 0.95
GetAfterTasksMethod · 0.80
GetHeadTasksMethod · 0.80
GetTailTasksMethod · 0.80
GetIdMethod · 0.65