1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-06 05:51:54 +00:00
This commit is contained in:
Newnius 2020-07-01 11:26:50 +08:00
parent 41405513d5
commit 0434dc2fce

View File

@ -41,7 +41,9 @@ func serverAPI(w http.ResponseWriter, r *http.Request) {
msgSubmit.Code = 1
msgSubmit.Error = err.Error()
} else {
job.Name = job.Name + "-" + string(time.Now().Unix()) + string(1000+rand.Intn(8999))
job.Name = job.Name + "-"
job.Name += strconv.FormatInt(time.Now().Unix(), 10)
job.Name += strconv.Itoa(1000 + rand.Intn(8999))
for i := range job.Tasks {
job.Tasks[i].ID = job.Name + ":" + job.Tasks[i].Name
job.Tasks[i].Job = job.Name