MCPcopy Index your code
hub / github.com/apache/devlake / updateTaskProgress

Function updateTaskProgress

backend/server/services/task_runner.go:133–150  ·  view source on GitHub ↗
(done chan struct{}, taskId uint64, progress chan plugin.RunningProgress)

Source from the content-addressed store, hash-verified

131}
132
133func updateTaskProgress(done chan struct{}, taskId uint64, progress chan plugin.RunningProgress) {
134 data := getRunningTaskById(taskId)
135 if data == nil {
136 return
137 }
138 progressDetail := data.ProgressDetail
139 for {
140 p, hasMore := <-progress
141 if hasMore {
142 runningTasks.mu.Lock()
143 runner.UpdateProgressDetail(basicRes, taskId, progressDetail, &p)
144 runningTasks.mu.Unlock()
145 } else {
146 done <- struct{}{}
147 break
148 }
149 }
150}

Callers 1

runTaskStandaloneFunction · 0.85

Calls 1

getRunningTaskByIdFunction · 0.85

Tested by

no test coverage detected