TorMgr: Change new identity cooldown to 7 seconds instead of 6
Because sometimes a new identity was not being respected Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
parent
1cc0ffcb20
commit
4a8ba594d1
@ -61,9 +61,9 @@ connection_pool = urllib3.PoolManager(cert_reqs='CERT_REQUIRED')
|
||||
|
||||
class TorManager:
|
||||
MAX_TRIES = 3
|
||||
# Remember the 6-sec wait times, so make cooldown be two of those
|
||||
# Remember the 7-sec wait times, so make cooldown be two of those
|
||||
# (otherwise it will retry forever if 429s never end)
|
||||
COOLDOWN_TIME = 12
|
||||
COOLDOWN_TIME = 14
|
||||
|
||||
def __init__(self):
|
||||
self.old_tor_connection_pool = None
|
||||
@ -150,8 +150,8 @@ class TorManager:
|
||||
# be a new IP, based on experiments.
|
||||
# Not necessary after first new identity
|
||||
if original_try_num > 1:
|
||||
print('Sleeping for 6 seconds before retrying request')
|
||||
time.sleep(6) # experimentally determined minimum
|
||||
print('Sleeping for 7 seconds before retrying request')
|
||||
time.sleep(7) # experimentally determined minimum
|
||||
|
||||
return None
|
||||
finally:
|
||||
|
Loading…
x
Reference in New Issue
Block a user