webapps.mason.backend.watchdog: simplify.

char-rename
John Benediktsson 2017-01-22 14:44:20 -08:00
parent 5993e2008e
commit d1242003ba
1 changed files with 4 additions and 7 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math math.parser sequences xml.syntax xml.writer
mason.email webapps.mason.backend ;
USING: formatting kernel mason.email math sequences
webapps.mason.backend xml.syntax xml.writer ;
IN: webapps.mason.backend.watchdog
: crashed-builder-body ( crashed-builders -- string content-type )
@ -18,12 +18,9 @@ IN: webapps.mason.backend.watchdog
XML> xml>string
"text/html" ;
: s ( n before after -- string )
pick 1 > [ "s" append ] when
[ number>string ] 2dip surround ;
: crashed-builder-subject ( crashed-builders -- string )
length "Take note: " " crashed build machine" s ;
length dup 1 > "" "s" ?
"Take note: %d crashed build machine%s" sprintf ;
: send-crashed-builder-email ( crashed-builders -- )
[ crashed-builder-body ]