Fixes to artwork
This commit is contained in:
parent
e818e23149
commit
6049ec468a
1 changed files with 5 additions and 5 deletions
|
@ -166,7 +166,7 @@ class Image_Cache_Thread(Thread):
|
||||||
except Empty:
|
except Empty:
|
||||||
sleep(1000)
|
sleep(1000)
|
||||||
continue
|
continue
|
||||||
sleep = 0
|
sleeptime = 0
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
requests.head(
|
requests.head(
|
||||||
|
@ -181,16 +181,16 @@ class Image_Cache_Thread(Thread):
|
||||||
except requests.ConnectionError:
|
except requests.ConnectionError:
|
||||||
# Server thinks its a DOS attack, ('error 10053')
|
# Server thinks its a DOS attack, ('error 10053')
|
||||||
# Wait before trying again
|
# Wait before trying again
|
||||||
if sleep > 5:
|
if sleeptime > 5:
|
||||||
log.error('Repeatedly got ConnectionError for url %s'
|
log.error('Repeatedly got ConnectionError for url %s'
|
||||||
% double_urldecode(url))
|
% double_urldecode(url))
|
||||||
break
|
break
|
||||||
log.debug('Were trying too hard to download art, server '
|
log.debug('Were trying too hard to download art, server '
|
||||||
'over-loaded. Sleep %s seconds before trying '
|
'over-loaded. Sleep %s seconds before trying '
|
||||||
'again to download %s'
|
'again to download %s'
|
||||||
% (2**sleep, double_urldecode(url)))
|
% (2**sleeptime, double_urldecode(url)))
|
||||||
sleep((2**sleep)*1000)
|
sleep((2**sleeptime)*1000)
|
||||||
sleep += 1
|
sleeptime += 1
|
||||||
continue
|
continue
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error('Unknown exception for url %s: %s'
|
log.error('Unknown exception for url %s: %s'
|
||||||
|
|
Loading…
Reference in a new issue