Browse Source

less verbose retrying

themage
theMage 4 years ago
parent
commit
84a40634ff
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/CinePantufas/Core.pm

+ 2 - 2
lib/CinePantufas/Core.pm

@ -291,9 +291,10 @@ sub __cmd_get_new {
291 291
        if ($epidb{$k}) {
292 292
          my $old = from_json($epidb{$k},{utf8=>1});
293 293
          
294
          if ($old->{status} eq 'failed' and rand(20)>19) {
294
          if ($old->{status} eq 'failed' and rand(1_000)>999) {
295 295
            $old->{status} = 'new';
296 296
            $old->{prio} = -100;
297
            $new--;
297 298
          }
298 299
          next unless $old->{status} eq 'new';
299 300
          next unless $episode->{prio} > $old->{prio};
@ -369,7 +370,6 @@ sub __queue_new {
369 370
    $episode->{failed}++;
370 371
    if ( $episode->{failed} >= 10 ) {
371 372
      $episode->{status} = 'failed';
372
      print STDERR "giving up on $episode->{show} - $episode->{number}\n";
373 373
    }
374 374
    $epidb{$k} = to_json($episode,{utf8=>1});
375 375
  }