X-Git-Url: https://git.exim.org/buildfarm-server.git/blobdiff_plain/b564b34f88097cd394f50c47cf6cfa68a922c8be..2af257e0d895751efaf3d9db9d69b5c5c04c3606:/bf-alerts.pl?ds=inline diff --git a/bf-alerts.pl b/bf-alerts.pl index 66c0c6d..091b558 100755 --- a/bf-alerts.pl +++ b/bf-alerts.pl @@ -116,6 +116,10 @@ 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} || {} }; @@ -240,9 +244,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 " .