1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-06 05:51:54 +00:00

return jobName when submit job

This commit is contained in:
Newnius 2020-07-09 00:00:31 +08:00
parent 6c9e802a31
commit 17fd698e35
2 changed files with 4 additions and 2 deletions

View File

@ -67,6 +67,7 @@ func serverAPI(w http.ResponseWriter, r *http.Request) {
job.Tasks[i].Job = job.Name
}
job.CreatedAt = int(time.Now().Unix())
msgSubmit.JobName = job.Name
scheduler.Schedule(job)
}
js, err := json.Marshal(msgSubmit)

View File

@ -6,8 +6,9 @@ type MsgAgentReport struct {
}
type MsgSubmit struct {
Code int `json:"code"`
Error string `json:"error"`
Code int `json:"code"`
Error string `json:"error"`
JobName string `json:"jobName"`
}
type MsgPoolStatusHistory struct {