From 984ff320f2c6d9f86b8993ad6e598f666cba3e0c Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Fri, 13 Dec 2019 18:32:00 +0000 Subject: [PATCH] pkgstat: exclude bloody from aggregated stats --- lib/OOCEapps/Model/PkgStat.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/OOCEapps/Model/PkgStat.pm b/lib/OOCEapps/Model/PkgStat.pm index 951c144..e2131c0 100644 --- a/lib/OOCEapps/Model/PkgStat.pm +++ b/lib/OOCEapps/Model/PkgStat.pm @@ -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;