summaryrefslogtreecommitdiff
path: root/rhautoimport-rs
diff options
context:
space:
mode:
Diffstat (limited to 'rhautoimport-rs')
-rwxr-xr-xrhautoimport-rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/rhautoimport-rs b/rhautoimport-rs
index f525a6e..75eac79 100755
--- a/rhautoimport-rs
+++ b/rhautoimport-rs
@@ -39,6 +39,7 @@ my $RSS_URL = "http://cba.fro.at/seriesrss/262433?c=Kfs2IoV2Wmd";
$XML::Feed::MULTIPLE_ENCLOSURES=1;
my $RD_GROUP = "radioStimm";
my $PV_ID = '75';
+my $LAST_RUN = 0;
my $curweek = RHRD::utils::get_rd_week();
my %week_table = ( 1 => 2, 2 => 6, 3 => 2, 4 => 6 );
@@ -47,11 +48,13 @@ my $nextweek = $curweek == 4 ? 1 : $curweek + 1;
if($#ARGV >= 0) {
if($curweek == 1 || $curweek == 3) {
if($ARGV[0] eq 'lastdi') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n";
+ $LAST_RUN = 1;
}
} else {
if($ARGV[0] eq 'lastsa') {
- print "!!!This is the last attempt, there won't be a retry on error!!!\n"
+ print "!!!This is the last attempt, there won't be a retry on error!!!\n";
+ $LAST_RUN = 1;
}
}
}
@@ -171,7 +174,7 @@ for my $entry ($feed->entries) {
}
if($uri eq "") {
print "No Entry found from $bd - ";
- if($#ARGV >= 0 && $ARGV[0] eq 'last') {
+ if($LAST_RUN) {
print "giving up, manual import necessary!!!\n";
} else {
print "will retry later\n";