MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / GetTaskPhaseProgress

Function GetTaskPhaseProgress

routers/controllers/workflow.go:27–43  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

25}
26
27func GetTaskPhaseProgress(c *gin.Context) {
28 taskId := hashid.FromContext(c)
29 resp, err := explorer.TaskPhaseProgress(c, taskId)
30 if err != nil {
31 c.JSON(200, serializer.Err(c, err))
32 c.Abort()
33 return
34 }
35
36 if resp != nil {
37 c.JSON(200, serializer.Response{
38 Data: resp,
39 })
40 } else {
41 c.JSON(200, serializer.Response{Data: queue.Progresses{}})
42 }
43}
44
45func SetDownloadTaskTarget(c *gin.Context) {
46 taskId := hashid.FromContext(c)

Callers

nothing calls this directly

Calls 3

FromContextFunction · 0.92
TaskPhaseProgressFunction · 0.92
ErrFunction · 0.92

Tested by

no test coverage detected