Remove useless condition

master
Heuzef 5 years ago
parent 32feacceda
commit 776672d104
  1. 2
      Check.pm

@ -85,14 +85,12 @@ sub action
my $new_size_q3 = 0; my $new_size_q3 = 0;
my $sizes = new Statistics::Descriptive::Full; my $sizes = new Statistics::Descriptive::Full;
if ( scalar( @Backups ) ){
foreach my $backup ( @Backups ) { foreach my $backup ( @Backups ) {
# Skip partial or active backups # Skip partial or active backups
next if ( $backup->{type} !~ m/^full|incr$/ ); next if ( $backup->{type} !~ m/^full|incr$/ );
# Push all the sizes in our data set to compute avg sizes # Push all the sizes in our data set to compute avg sizes
# Exclude backup N°0 as it'll always have much more new data than normal backups # Exclude backup N°0 as it'll always have much more new data than normal backups
$sizes->add_data($backup->{sizeNew}) unless ( $backup->{num} == 0 ); $sizes->add_data($backup->{sizeNew}) unless ( $backup->{num} == 0 );
}
# Ignore the last backup if it's not full or incr (which means it's either partial or active) # Ignore the last backup if it's not full or incr (which means it's either partial or active)
my $i = ( $Backups[-1]->{type} =~ m/^full|incr$/ ) ? -1 : -2; my $i = ( $Backups[-1]->{type} =~ m/^full|incr$/ ) ? -1 : -2;

Loading…
Cancel
Save