Code |FrontPage |HiveTraits | ||
Hive-case2
A notification needs to be sent to 2 channels #solaris, #windows when a mail arrives in
our name in the watching machine (let us call it _watchmachine).
The members in each of these channels will have to mail to testresults@hivehome.com on completion of the tests.
|cat mailwatcher.seq
[channel => '#hive' !do $me:tell[#solaris,#windows:initprocs] where $my:name =/watchmachine/ when $mailwatch:mails[new:.*] ] |
|cat tests.seq
['#solaris','#windows'].each do |c| [channel => c !do $me:map[result:$pat:start[-s mytests.seq]] $mail:send[testresults@hivehome.com:$me:map[result]] ] end |
|cat case2.seq
[channel => '#hive' !do $me:tell[#solaris,#windows:initprocs] where $my:name =~ /watchmachine/ when $mailwatch:mails[new:.*] ] ['#solaris','#windows'].each do |c| [channel => c !do $mail:send[testresults@hivehome.com:$pat:start[-s mytests.seq]] ] end |
!do $me:seq[case2]
|