webapps.mason.backend.watchdog: simplify.
parent
5993e2008e
commit
d1242003ba
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2010 Slava Pestov.
|
! Copyright (C) 2010 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel math math.parser sequences xml.syntax xml.writer
|
USING: formatting kernel mason.email math sequences
|
||||||
mason.email webapps.mason.backend ;
|
webapps.mason.backend xml.syntax xml.writer ;
|
||||||
IN: webapps.mason.backend.watchdog
|
IN: webapps.mason.backend.watchdog
|
||||||
|
|
||||||
: crashed-builder-body ( crashed-builders -- string content-type )
|
: crashed-builder-body ( crashed-builders -- string content-type )
|
||||||
|
@ -18,12 +18,9 @@ IN: webapps.mason.backend.watchdog
|
||||||
XML> xml>string
|
XML> xml>string
|
||||||
"text/html" ;
|
"text/html" ;
|
||||||
|
|
||||||
: s ( n before after -- string )
|
|
||||||
pick 1 > [ "s" append ] when
|
|
||||||
[ number>string ] 2dip surround ;
|
|
||||||
|
|
||||||
: crashed-builder-subject ( crashed-builders -- string )
|
: 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 -- )
|
: send-crashed-builder-email ( crashed-builders -- )
|
||||||
[ crashed-builder-body ]
|
[ crashed-builder-body ]
|
||||||
|
|
Loading…
Reference in New Issue