Skip to content

Commit

Permalink
Merge pull request #85 from hadfl/pkgstat
Browse files Browse the repository at this point in the history
pkgstat: exclude bloody from aggregated stats
  • Loading branch information
citrus-it authored Dec 13, 2019
2 parents 8cc51c9 + 984ff32 commit 401aaba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/OOCEapps/Model/PkgStat.pm
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ my $parseFiles = sub {
$zone //= 'global';
$image //= 'full';

$data->{$_}->{$days}->{$ip}->{count}++ for ($rel, 'total');
# exclude bloody from aggregated stats
my @rels = ($rel, $rel eq 'bloody' ? () : qw(total));
$data->{$_}->{$days}->{$ip}->{count}++ for @rels;
exists $data->{$_}->{$days}->{$ip}->{uuids}->{$uuid} || do {
$data->{$_}->{$days}->{$ip}->{uuids}->{$uuid}->{$zone} = 1;
$data->{$_}->{$days}->{$ip}->{uuids}->{$uuid}->{$image} = 1;
} for ($rel, 'total');
} for @rels;
}

close $fh;
Expand Down

0 comments on commit 401aaba

Please sign in to comment.