diff options
author | Christian Pointner <equinox@helsinki.at> | 2012-09-27 14:55:11 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2012-09-27 14:55:11 (GMT) |
commit | 1cc29cc247ed9f78858b0ec4b24aed0bb5e1ffe3 (patch) | |
tree | 4643c2f88bfe38672096c26df1dd639c8ed618fc /rhimport-ra | |
parent | 11affa681c9cfb751a82f76e813655d170b3954e (diff) |
autoimport scripts now know if the run for the last time
Diffstat (limited to 'rhimport-ra')
-rwxr-xr-x | rhimport-ra | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rhimport-ra b/rhimport-ra index bacfce4..84097f0 100755 --- a/rhimport-ra +++ b/rhimport-ra @@ -48,6 +48,10 @@ binmode(STDIN, ":utf8"); binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); +if($#ARGV >= 0 && $ARGV[0] eq 'last') { + print "!!!This is the last attempt, there won't be a retry on error!!!\n" +} + my $user = `/usr/bin/id -un`; $user =~ s/\n//; my $group = "RadioATTAC"; @@ -118,7 +122,12 @@ for my $entry ($feed->entries) { } } if($file eq "" || !(-e "$file")) { - print "No Entry found from $bd or download error - will retry later\n"; + print "No Entry found from $bd or download error - "; + if($#ARGV >= 0 && $ARGV[0] eq 'last') { + print "giving up, manual import necessary!!!\n"; + } else { + print "will retry later\n"; + } exit 1; } |