X-Git-Url: https://git.exim.org/buildfarm-server.git/blobdiff_plain/0daa6a52894a56a5bf09cfd14970e652d768a554..323c477272ae31c96ac20e3f9e293b5e84eceb85:/bf-alerts.pl?ds=sidebyside diff --git a/bf-alerts.pl b/bf-alerts.pl index 2481371..8c93210 100755 --- a/bf-alerts.pl +++ b/bf-alerts.pl @@ -116,10 +116,6 @@ print "starting alert run: $lts\n"; foreach my $sysbranch (@last_heard) { - # not all versions of DBD::Pg decode modern bytea literals nicely. cope. - $sysbranch->{config} =~ s/^(\\?x)([a-fA-F0-9]+)$/pack('H*',$2)/e; - - my $client_conf = thaw $sysbranch->{config}; my %client_alert_settings = %{ $client_conf->{alerts} || {} }; @@ -202,7 +198,7 @@ my $me = `id -un`; chomp $me; my $host = `hostname`; chomp ($host); $host = $default_host unless ($host =~ m/[.]/ || !defined($default_host)); -my $from_addr = "PG Build Farm <$me\@$host>"; +my $from_addr = "Exim BuildFarm <$me\@$host>"; $from_addr =~ tr /\r\n//d; @@ -236,7 +232,7 @@ foreach my $clearme (@need_cleared) # $sth->finish; $msg->to($mailto); - $msg->subject("PGBuildfarm member $animal Branch $branch Alert cleared"); + $msg->subject("Exim BuildFarm member $animal Branch $branch Alert cleared"); my $fh = $msg->open; print $fh "\n\n$text\n"; $fh->close; @@ -244,9 +240,9 @@ foreach my $clearme (@need_cleared) print "alert cleared $animal $branch\n"; } -foreach my $clearme (@need_alerts) +foreach my $needme (@need_alerts) { - my ($sysbranch, $setting) = @$clearme; + my ($sysbranch, $setting) = @$needme; my ($animal, $branch) = ($sysbranch->{sysname},$sysbranch->{branch}); my $hours = sprintf("%.2f",($now - $sysbranch->{snapshot}) / 3600); my $text = "$sysbranch->{sysname} has not reported " . @@ -265,7 +261,7 @@ foreach my $clearme (@need_alerts) $msg->to($mailto); - $msg->subject("PGBuildfarm member $animal Branch $branch " . + $msg->subject("Exim BuildFarm member $animal Branch $branch " . "Alert notification"); my $fh = $msg->open; print $fh "\n\n$text\n";