1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-15 08:16:43 +00:00
This commit is contained in:
2019-03-25 15:36:30 +08:00
parent 66b4468c74
commit 804dfa969f
4 changed files with 76 additions and 66 deletions

View File

@@ -59,7 +59,14 @@ func serverAPI(w http.ResponseWriter, r *http.Request) {
case "task_logs":
fmt.Println("task_logs")
fmt.Println(r.URL.Query().Get("id"))
js, _ := json.Marshal(allocator.logs(r.URL.Query().Get("id")))
js, _ := json.Marshal(allocator.logs(r.URL.Query().Get("job"), r.URL.Query().Get("task")))
w.Header().Set("Content-Type", "application/json")
w.Write(js)
break
case "jobs":
fmt.Println("job_list")
js, _ := json.Marshal(allocator.listJobs())
w.Header().Set("Content-Type", "application/json")
w.Write(js)
break