Skip to content

Commit

Permalink
Tweak email subject
Browse files Browse the repository at this point in the history
  • Loading branch information
xrchz committed Nov 28, 2017
1 parent 11694c3 commit 1b0c66f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apiLib.sml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ fun read_total_time dir inp =
val max_dir_length = 50

datatype status = Pending | Success | Failure | Aborted
fun status_to_string Pending = "Pending"
| status_to_string Success = "Success"
| status_to_string Failure = "Failure"
| status_to_string Aborted = "Aborted"

fun read_status inp =
let
Expand Down
4 changes: 3 additions & 1 deletion server.sml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,13 @@ fun stop id =
val inp = TextIO.openIn new
val sha = get_head_sha (read_bare_snapshot inp)
val status = read_status inp
val inp = (TextIO.closeIn inp; TextIO.openIn new)
val typ = read_job_type inp
in
TextIO.closeIn inp;
Posix.IO.close fd;
GitHub.set_status f sha status;
send_email (String.concat["Job ",f,": ",#2 (GitHub.status status)])
send_email (String.concat[status_to_string status,": Job ",f," (",typ,")"])
(String.concat["See ",server,"/job/",f,"\n"]);
()
end
Expand Down

0 comments on commit 1b0c66f

Please sign in to comment.