X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=get_sgf;fp=get_sgf;h=0ce9a6ede2c9b06c61f5287bd35636decc7d2021;hb=62f6d609f229925b70858abbb93b19a304407da9;hp=b6d41534a34c29742eb5d7d11a083af8d801cabb;hpb=33ea8348c21dff684a32ef2b1e8014e0c3ef3895;p=bin.git diff --git a/get_sgf b/get_sgf index b6d4153..0ce9a6e 100755 --- a/get_sgf +++ b/get_sgf @@ -130,6 +130,7 @@ for my $url (@ARGV) { $m->submit(); my $content; my $state; + my $sleep; VALID_LOOP: { do { $state = $m->clone; @@ -138,9 +139,10 @@ for my $url (@ARGV) { $m->save_content('temp.ps'); last VALID_LOOP; } - print STDERR "Failure to download content, waiting 180 seconds\n"; + $sleep = 240+int(rand*120); + print STDERR "Failure to download content, waiting $sleep seconds\n"; $m = $state; - } while (sleep 180); + } while (sleep $sleep); } system('gzip','temp.ps'); system("$ENV{HOME}/bin/sgf_rename",'temp.sgf');