summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-09 19:30:04 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-10-09 19:30:04 (GMT)
commit439d98c65289f19662459106de1cc1a40ee2c5f4 (patch)
tree0be11057f77c0252afbf8204d6178bac8b266e3e /utils
parentc253bf234deafa69ed2e462c8ec2d8f41b484e9e (diff)
first checks for showids
Diffstat (limited to 'utils')
-rwxr-xr-xutils/rhrd-sanity-check35
1 files changed, 28 insertions, 7 deletions
diff --git a/utils/rhrd-sanity-check b/utils/rhrd-sanity-check
index 6cfb2d7..13b2b45 100755
--- a/utils/rhrd-sanity-check
+++ b/utils/rhrd-sanity-check
@@ -281,9 +281,31 @@ sub check_showids
my ($ctx) = @_;
my $errors = 0,
- print "logs:\n";
- print " ... checks not yet implemtned!!\n";
+ print "showids:\n";
+
+ my @show_ids = RHRD::rddb::list_showids($ctx);
+ if(!defined $show_ids[0] && defined $show_ids[1]) {
+ print STDERR "$show_ids[1]: $show_ids[2]";
+ return -1;
+ }
+ for my $show_id (@show_ids) {
+ my @carts = RHRD::rddb::get_show_carts($ctx, $show_id);
+ if(!defined $carts[0] && defined $carts[1]) {
+ print " showid '" . $show_id . "': $carts[2]\n";
+ $errors++;
+ }
+ if(scalar @carts == 0) {
+ print " showid '" . $show_id . "': has no log assigned or log is empty\n";
+ $errors++;
+ }
+ my ($group, $status, $errorstring) = RHRD::rddb::get_show_group($ctx, $show_id);
+ unless(defined($group)) {
+ print " showid '" . $show_id . "': has no dropbox assigned\n";
+ $errors++;
+ } else {
+ }
+ }
print "\n " . $errors . " errors found\n";
return $errors;
@@ -296,7 +318,6 @@ sub check_logs
my $errors = 0,
print "logs:\n";
- print " ... checks not yet implemtned!!\n";
print "\n " . $errors . " errors found\n";
@@ -306,13 +327,13 @@ sub check_logs
my ($ctx, $status, $errorstring) = RHRD::rddb::init();
if(defined $ctx) {
- check_groups($ctx);
- print "\n";
- check_dropboxes($ctx);
- print "\n";
check_showids($ctx);
print "\n";
check_logs($ctx);
+ print "\n";
+ check_groups($ctx);
+ print "\n";
+ check_dropboxes($ctx);
RHRD::rddb::destroy($ctx);
} else {