diff --git a/eprints1.pl b/eprints1.pl index 0f92a207b1a81003736e7e41b70d9277883ba3ad..f5e8c43f6e8f9f4a89007cd6d3ab3709771b6d7b 100755 --- a/eprints1.pl +++ b/eprints1.pl @@ -118,7 +118,7 @@ my $op_mode= 'unknown'; my $ot2ut_context= 'ot2ut-test'; # TODO: parametrize # my $ot2ut_context= 'ot2ut-prod'; # TODO: parametrize my $oma_sleep_time= 10; -my $MAX_BLOCK= 670; +my $MAX_BLOCK= 680; my %map_ot2ut_roles= ( @@ -5136,6 +5136,8 @@ sub policies_stats </tr> EOX + my %incomplete_blocks= (); + for (my $metablock_nr= 0; $metablock_nr <= $#metablocks; $metablock_nr++) { my $mb_othes= $metablocks[$metablock_nr]->{othes}->{cnt_total}; @@ -5206,8 +5208,23 @@ EOX my $c= $block->{$context}->{cnt_ok}; my $e= $block->{$context}->{cnt_error}; my $pct= $c*100.0/$b_othes; - my $ck1= ($pct == 100.0) ? 'lightgreen' : 'lightblue'; my $ck2= ($e == 0) ? 'lightgreen' : 'pink'; + my $ck1; + + if ($pct == 100.0) + { + $ck1= 'lightgreen' + } + elsif ($pct >= 100.0) + { # uploaded objects which were deleted from othes in the meantime + $ck1= 'pink'; + } + else + { + $ck1= 'lightblue'; + push (@{$incomplete_blocks{$context}}, $block_nr); + } + printf MB (" <td bgcolor=\"$ck1\">%d</td><td bgcolor=\"$ck1\">%7.4f %%</td><td bgcolor=\"$ck2\">%d</td>\n", $c, $pct, $e); } print MB "</tr>\n"; @@ -5362,6 +5379,14 @@ EOX Util::JSON::write_json_file('stale_uploads.json', \%stale_uploads); } + if (exists ($incomplete_blocks{'test'})) + { + my $ibt= $incomplete_blocks{'test'}; + print IDX "<h2>incomplete blocks in context test</h2>\n"; + print IDX join(' ', @$ibt), "\n"; + } + Util::JSON::write_json_file('incomplete_blocks.json', \%incomplete_blocks); + print IDX "<h2>errors</h2>\n". Dumper(\%cnt_errors); print IDX "<h2>warnings</h2>\n". Dumper(\%cnt_warnings);