diff options
author | Christian Pointner <equinox@spreadspace.org> | 2016-05-06 17:31:15 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2016-05-06 17:31:15 (GMT) |
commit | 85d9a451c7d11d3d93252570bf9d9dfb638f55bc (patch) | |
tree | 675251fa1b1882fd535954b53e8fcc9705ff3170 /utils/rhrd-schedules | |
parent | dabc13ac274bea972da157707846351bbdfa69f1 (diff) |
return error count on generate
Diffstat (limited to 'utils/rhrd-schedules')
-rwxr-xr-x | utils/rhrd-schedules | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/rhrd-schedules b/utils/rhrd-schedules index cee3f3d..7cc3194 100755 --- a/utils/rhrd-schedules +++ b/utils/rhrd-schedules @@ -43,6 +43,7 @@ sub generate return 1; } + my $errcnt = 0; my @shows = (); for my $entry (@{$data}) { my $start = DateTime::Format::Strptime::strptime("%Y-%m-%d_%H:%M:%S", ${$entry}{'start'}); @@ -57,6 +58,7 @@ sub generate if($showid < 0) { print "WARNING: skipping entry whith unset automation id -> $start: $title ($pvid)\n"; + $errcnt++; next; } my ($exists, $status, $errorstring) = RHRD::rddb::check_show_exists($ctx, $showid); @@ -83,7 +85,7 @@ sub generate print "$status: $errorstring\n"; return 1; } - return 0; + return $errcnt; } sub show__day |