mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-15 08:16:43 +00:00
update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user