mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-06-07 22:31:55 +00:00
return jobName when submit job
This commit is contained in:
parent
6c9e802a31
commit
17fd698e35
@ -67,6 +67,7 @@ func serverAPI(w http.ResponseWriter, r *http.Request) {
|
|||||||
job.Tasks[i].Job = job.Name
|
job.Tasks[i].Job = job.Name
|
||||||
}
|
}
|
||||||
job.CreatedAt = int(time.Now().Unix())
|
job.CreatedAt = int(time.Now().Unix())
|
||||||
|
msgSubmit.JobName = job.Name
|
||||||
scheduler.Schedule(job)
|
scheduler.Schedule(job)
|
||||||
}
|
}
|
||||||
js, err := json.Marshal(msgSubmit)
|
js, err := json.Marshal(msgSubmit)
|
||||||
|
@ -8,6 +8,7 @@ type MsgAgentReport struct {
|
|||||||
type MsgSubmit struct {
|
type MsgSubmit struct {
|
||||||
Code int `json:"code"`
|
Code int `json:"code"`
|
||||||
Error string `json:"error"`
|
Error string `json:"error"`
|
||||||
|
JobName string `json:"jobName"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type MsgPoolStatusHistory struct {
|
type MsgPoolStatusHistory struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user