diff options
author | bugzilla <bugzilla@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-01-22 19:46:55 +0000 |
---|---|---|
committer | bugzilla <bugzilla@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-01-22 19:46:55 +0000 |
commit | a85e6ffd7f62af3eab168fc03363d4038ec68f96 (patch) | |
tree | 575a94b6bd6b428edfc875295132e377a3d85c23 /bin/nightlybuilds | |
parent | 0b07cf051aa274f7f1a5be35af8bfbd3ba768ba8 (diff) | |
download | ATCD-a85e6ffd7f62af3eab168fc03363d4038ec68f96.tar.gz |
Handles unresponsive servers better.
Diffstat (limited to 'bin/nightlybuilds')
-rwxr-xr-x | bin/nightlybuilds/scoreboard_update.pl | 110 |
1 files changed, 68 insertions, 42 deletions
diff --git a/bin/nightlybuilds/scoreboard_update.pl b/bin/nightlybuilds/scoreboard_update.pl index 7b3d69e84ae..17209780190 100755 --- a/bin/nightlybuilds/scoreboard_update.pl +++ b/bin/nightlybuilds/scoreboard_update.pl @@ -204,6 +204,11 @@ sub load_web_dir ($) ### Request the web dir page my $ua = LWP::UserAgent->new; + + ### We are impatient, so don't wait more than 10 seconds for a + ### response (the default was 180 seconds) + $ua->timeout(10); + my $request = HTTP::Request->new('GET', $address); my $response = $ua->request($request); @@ -307,6 +312,12 @@ sub update_cache ($) } foreach my $build (@builds) { + ### Check to see if we had problems. If there is no latest time, + ### we had problems downloading. + if (!defined $build_latest_time{$build}) { + next; + } + my $time = $build_latest_time{$build}; my $oldtime = ''; my $address = $build_list{$build} . "/" @@ -532,61 +543,76 @@ sub update_html ($$) "<TH>Tests\n"; foreach my $build (@builds) { - my $time = $build_latest_time{$build}; - mkpath "$dir/$build/pretty"; print " Looking at $build\n"; - my $log = $dir . '/' . $build . '/' . $build . '_' . $time . ".txt"; + if (defined $build_latest_time{$build}) { + my $time = $build_latest_time{$build}; - my $webfile = "$build/pretty/$build" . "_$time"; - my $newfile = "$dir/$webfile"; + my $log = $dir . '/' . $build . '/' . $build . '_' . $time . ".txt"; - $newfile =~ s/\//\\/g; - $log =~ s/\//\\/g; + my $webfile = "$build/pretty/$build" . "_$time"; + my $newfile = "$dir/$webfile"; - if (!-e $newfile.'.html') { - print " Creating HTML for $time\n"; + $newfile =~ s/\//\\/g; + $log =~ s/\//\\/g; - my $command = 'perl '.$script.' -c makefile < '.$log.' > '. - $newfile.'.html'; + if (!-e $newfile.'.html') { + print " Creating HTML for $time\n"; - system ($command); - } + my $command = 'perl '.$script.' -c makefile < '.$log.' > '. + $newfile.'.html'; - if (!-e $newfile.'_Brief.html') { - print " Creating HTML Brief for $time\n"; + system ($command); + } - my $command = 'perl '.$script.' -b -c ' - .determine_type ($log). - ' < '.$log.' > '. - $newfile.'_Brief.html'; + if (!-e $newfile.'_Brief.html') { + print " Creating HTML Brief for $time\n"; + + my $command = 'perl '.$script.' -b -c ' + .determine_type ($log). + ' < '.$log.' > '. + $newfile.'_Brief.html'; - system ($command); - } + system ($command); + } - print $indexhtml '<TR><TD>'; - print $indexhtml "<A HREF=\"".$build_web{$build} ."\">$build</A> "; - print $indexhtml '<TD bgcolor='; - print $indexhtml timestamp_color ($time); - print $indexhtml '>',decode_timestamp ($time); - print $indexhtml '<TD bgcolor='; - print $indexhtml get_color ($newfile.'_Brief.html', 'cvs'); - print $indexhtml '>'; - print $indexhtml "<A HREF=\"".$webfile.".html#cvs\">[Full]</A> "; - print $indexhtml "<A HREF=\"".$webfile."_Brief.html#cvs\">[Brief]</A>"; - print $indexhtml '<TD bgcolor='; - print $indexhtml get_color ($newfile.'_Brief.html', 'compiler'); - print $indexhtml '>'; - print $indexhtml "<A HREF=\"".$webfile.".html#compiler\">[Full]</A> "; - print $indexhtml "<A HREF=\"".$webfile."_Brief.html#compiler\">[Brief]</A>"; - print $indexhtml '<TD bgcolor='; - print $indexhtml get_color ($newfile.'_Brief.html', 'tests'); - print $indexhtml '>'; - print $indexhtml "<A HREF=\"".$webfile.".html#tests\">[Full]</A> "; - print $indexhtml "<A HREF=\"".$webfile."_Brief.html#tests\">[Brief]</A>"; - print $indexhtml "\n"; + print $indexhtml '<TR><TD>'; + print $indexhtml "<A HREF=\"".$build_web{$build} ."\">$build</A> "; + print $indexhtml '<TD bgcolor='; + print $indexhtml timestamp_color ($time); + print $indexhtml '>',decode_timestamp ($time); + print $indexhtml '<TD bgcolor='; + print $indexhtml get_color ($newfile.'_Brief.html', 'cvs'); + print $indexhtml '>'; + print $indexhtml "<A HREF=\"".$webfile.".html#cvs\">[Full]</A> "; + print $indexhtml "<A HREF=\"".$webfile."_Brief.html#cvs\">[Brief]</A>"; + print $indexhtml '<TD bgcolor='; + print $indexhtml get_color ($newfile.'_Brief.html', 'compiler'); + print $indexhtml '>'; + print $indexhtml "<A HREF=\"".$webfile.".html#compiler\">[Full]</A> "; + print $indexhtml "<A HREF=\"".$webfile."_Brief.html#compiler\">[Brief]</A>"; + print $indexhtml '<TD bgcolor='; + print $indexhtml get_color ($newfile.'_Brief.html', 'tests'); + print $indexhtml '>'; + print $indexhtml "<A HREF=\"".$webfile.".html#tests\">[Full]</A> "; + print $indexhtml "<A HREF=\"".$webfile."_Brief.html#tests\">[Brief]</A>"; + print $indexhtml "\n"; + + } + else { + print $indexhtml '<TR><TD>'; + print $indexhtml "<A HREF=\"".$build_web{$build} ."\">$build</A> "; + print $indexhtml '<TD bgcolor=gray>'; + print $indexhtml '<TD bgcolor=gray>'; + print $indexhtml "[Full] [Brief]"; + print $indexhtml '<TD bgcolor=gray>'; + print $indexhtml "[Full] [Brief]"; + print $indexhtml '<TD bgcolor=gray>'; + print $indexhtml "[Full] [Brief]"; + print $indexhtml "\n"; + } my @existing = glob ($dir . '/' . $build . '/pretty/' . $build . '_*.html'); |