| @@ -7,6 +7,7 @@ package routers | |||||
| import ( | import ( | ||||
| "bytes" | "bytes" | ||||
| "fmt" | |||||
| "net/http" | "net/http" | ||||
| "strconv" | "strconv" | ||||
| "strings" | "strings" | ||||
| @@ -792,9 +793,10 @@ func RecommendHomeInfo(ctx *context.Context) { | |||||
| func getCloudbrainNums() (map[string]string, error) { | func getCloudbrainNums() (map[string]string, error) { | ||||
| result := make(map[string]string) | result := make(map[string]string) | ||||
| result["completed_task"] = "1800" | |||||
| result["running_task"] = "20" | |||||
| result["wait_task"] = "30" | |||||
| cloudStatusMap := models.GetAllStatusCloudBrain() | |||||
| result["completed_task"] = fmt.Sprint(cloudStatusMap["COMPLETED"]) | |||||
| result["running_task"] = fmt.Sprint(cloudStatusMap["RUNNING"]) | |||||
| result["wait_task"] = fmt.Sprint(cloudStatusMap["WAITING"]) | |||||
| return result, nil | return result, nil | ||||
| } | } | ||||