diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-03-13 00:28:50 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-03-13 00:28:50 (GMT) |
commit | 66727097e79e98dc99b7c65105bb941ddf55e934 (patch) | |
tree | 9a939e114435183170b729afbf309ef268b5692e | |
parent | 43000f158817e8a5e5578e52598b6e28d64515b8 (diff) |
added special return code for non-imports which shouldn't give an error
-rwxr-xr-x | rhautoimport-btl | 2 | ||||
-rwxr-xr-x | rhautoimport-dn | 4 | ||||
-rwxr-xr-x | rhautoimport-nw | 2 | ||||
-rwxr-xr-x | rhautoimport-oi | 2 | ||||
-rwxr-xr-x | rhautoimport-ra | 4 | ||||
-rwxr-xr-x | rhautoimport-rs | 4 | ||||
-rwxr-xr-x | rhautoimport-tr | 4 |
7 files changed, 11 insertions, 11 deletions
diff --git a/rhautoimport-btl b/rhautoimport-btl index 38d3090..77da585 100755 --- a/rhautoimport-btl +++ b/rhautoimport-btl @@ -97,7 +97,7 @@ for my $entry ($feed->entries) { my $current_file = `cat $STAT_FILE`; if($current_file eq $file) { print "Already downloaded file of today\n"; - exit 0; + exit 42; } if(!rhautoimport::check_file_extension($file)) { print "\n\nThe extension of the matching file '". $file . "' seems to be wrong - manual import necessary!!!\n"; diff --git a/rhautoimport-dn b/rhautoimport-dn index 0feafdb..3bb0e58 100755 --- a/rhautoimport-dn +++ b/rhautoimport-dn @@ -79,7 +79,7 @@ for my $href ( @allowed_dbs ) { if($show_id < 0) { print "no dropbox for day in question\n"; - exit 0; + exit 42; } my $y = sprintf("%04d-%02d-%02d", @broadcast_day); @@ -107,7 +107,7 @@ for my $entry ($files_feed->entries) { my $current_file = `cat $STAT_FILE`; if($current_file eq $path[-1]) { print "Already downloaded file of day in question\n"; - exit 0; + exit 42; } $file = $path[-1]; if(!rhautoimport::check_file_extension($file)) { diff --git a/rhautoimport-nw b/rhautoimport-nw index e8f7dd0..47c0281 100755 --- a/rhautoimport-nw +++ b/rhautoimport-nw @@ -111,7 +111,7 @@ for my $entry ($feed->entries) { my $current_file = `cat $STAT_FILE`; if($current_file eq $file) { print "Already downloaded file of today\n"; - exit 0; + exit 42; } if(!rhautoimport::check_file_extension($file)) { print "\n\nThe extension of the matching file '". $file . "' seems to be wrong - manual import necessary!!!\n"; diff --git a/rhautoimport-oi b/rhautoimport-oi index 3cd8ad3..f558c5e 100755 --- a/rhautoimport-oi +++ b/rhautoimport-oi @@ -78,7 +78,7 @@ my $current_stat = `cat $STAT_FILE`; my ($current_id, $current_file) = $current_stat =~ m/^(.*)\n(.*)/; if($current_id eq $id) { print "Already downloaded current file\n"; - exit 0; + exit 42; } print "looking for files like '$bdfile' in RSS Feed\n"; diff --git a/rhautoimport-ra b/rhautoimport-ra index 14cbbf0..938749e 100755 --- a/rhautoimport-ra +++ b/rhautoimport-ra @@ -116,7 +116,7 @@ for my $entry ($feed->entries) { my $current_file = `cat $STAT_FILE`; if($current_file eq $file) { print "Already downloaded file of today\n"; - exit 0; + exit 42; } if(!rhautoimport::check_file_extension($file)) { print "\n\nThe extension of the matching file '". $file . "' seems to be wrong - manual import necessary!!!\n"; @@ -163,7 +163,7 @@ if($ret == 0) { print "\nImport Error:\n\n"; print $log; print "\n\nNot adding PV note!!"; - exit 1; + print "\n\nSince the import for the regular broadcast went through we will not retry this import!!!"; } } else { print "\nImport Error:\n\n"; diff --git a/rhautoimport-rs b/rhautoimport-rs index a409e19..0dedf26 100755 --- a/rhautoimport-rs +++ b/rhautoimport-rs @@ -102,7 +102,7 @@ print "day of latest original broadcast before next Radio Helsinki broadcast: " if(Date::Calc::Delta_Days(@broadcast_date, @today) <= 0) { print "File won't be available by now!\n"; - exit 0; + exit 42; } my $id = sprintf("%04d-%02d-%02d", @import_date); @@ -146,7 +146,7 @@ for my $entry ($feed->entries) { my ($current_id, $current_file) = $current_stat =~ m/^(.*)\n(.*)/; if($current_id eq $id && $current_file eq $file) { print "Already downloaded file of today\n"; - exit 0; + exit 42; } if(!rhautoimport::check_file_extension($file)) { print "\n\nThe extension of the matching file '". $file . "' seems to be wrong - manual import necessary!!!\n"; diff --git a/rhautoimport-tr b/rhautoimport-tr index 7077b88..f9e16b2 100755 --- a/rhautoimport-tr +++ b/rhautoimport-tr @@ -61,7 +61,7 @@ my $show_title = $allowed_dbs[0]->{'SHOWTITLE'}; my @today = Date::Calc::Standard_to_Business(Date::Calc::Today()); if($today[2] == 5) { print "please don't run this script on fridays!\n"; - exit 1; + exit 42; } my @broadcast_day = Date::Calc::Business_to_Standard($today[0], $today[1], 5); if($today[2] < 5) { @@ -110,7 +110,7 @@ for my $entry ($feed->entries) { my $current_file = `cat $STAT_FILE`; if($current_file eq $file) { print "Already downloaded file of today\n"; - exit 0; + exit 42; } if(!rhautoimport::check_file_extension($file)) { print "\n\nThe extension of the matching file '". $file . "' seems to be wrong - manual import necessary!!!\n"; |