summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-07 03:00:45 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-10-07 03:00:45 (GMT)
commitbf2c23eda20c6e494e1fb3e8f85b775cfaea3c37 (patch)
tree129b990e407c5e2fdd9b2cce00ac4a884bb0564c /utils
parentb040a840eb34d2d5e80fe19ed19a1a8125ca549d (diff)
added check for usage of show group carts
Diffstat (limited to 'utils')
-rwxr-xr-xutils/rhrd-sanity-check15
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/rhrd-sanity-check b/utils/rhrd-sanity-check
index 9a698d8..a64a5b7 100755
--- a/utils/rhrd-sanity-check
+++ b/utils/rhrd-sanity-check
@@ -49,6 +49,12 @@ sub check_groups
print "groups:\n";
+ my ($shows_low_cart, $shows_high_cart, $shows_chunk_size) = RHRD::rddb::get_shows_cart_range($ctx);
+ if(!$shows_low_cart) {
+ print "$shows_high_cart: $shows_chunk_size\n";
+ return 1;
+ }
+
my @groups = RHRD::rddb::list_groups($ctx);
if(!defined $groups[0] && defined $groups[1]) {
print STDERR "$groups[1]: $groups[2]";
@@ -69,6 +75,15 @@ sub check_groups
if(scalar @users == 0) {
print " group: '" . $group . "' has no members\n";
}
+
+ my @carts = RHRD::rddb::get_show_group_carts_used($ctx, $group);
+ if(!defined $carts[0] && defined $carts[1]) {
+ print STDERR "$carts[2]\n";
+ return 1;
+ }
+ if(scalar @carts == 0) {
+ print " group: '" . $group . "' no carts of range are used\n";
+ }
}
return 0;
}