|
|
@ -566,15 +566,15 @@ func (j *Job) Notify(t time.Time, msg string) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ts := t.Format(time.RFC3339)
|
|
|
|
ts := t.Format(time.RFC3339)
|
|
|
|
body := "job: " + j.Key() + "\n" +
|
|
|
|
body := "Job: " + j.Key() + "\n" +
|
|
|
|
"job name: " + j.Name + "\n" +
|
|
|
|
"Job name: " + j.Name + "\n" +
|
|
|
|
"job cmd: " + j.Command + "\n" +
|
|
|
|
"Job cmd: " + j.Command + "\n" +
|
|
|
|
"node: " + j.runOn + "\n" +
|
|
|
|
"Node: " + j.hostname + "|" + j.ip + "[" + j.runOn + "]\n" +
|
|
|
|
"time: " + ts + "\n" +
|
|
|
|
"Time: " + ts + "\n" +
|
|
|
|
"err: " + msg
|
|
|
|
"Error: " + msg
|
|
|
|
|
|
|
|
|
|
|
|
m := Message{
|
|
|
|
m := Message{
|
|
|
|
Subject: "node[" + j.runOn + "] job[" + j.ShortName() + "] time[" + ts + "] exec failed",
|
|
|
|
Subject: "[Cronsun] node[" + j.hostname + "|" + j.ip + "] job[" + j.ShortName() + "] time[" + ts + "] exec failed",
|
|
|
|
Body: body,
|
|
|
|
Body: body,
|
|
|
|
To: j.To,
|
|
|
|
To: j.To,
|
|
|
|
}
|
|
|
|
}
|
|
|
|