mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Also increase the time between visits to a search engine to two seconds
This commit is contained in:
parent
a7662ea9b1
commit
3e05244ae9
@ -32,7 +32,7 @@ Result = namedtuple('Result', 'url title cached_url')
|
||||
|
||||
|
||||
@contextmanager
|
||||
def rate_limit(name='test', time_between_visits=1, max_wait_seconds=5 * 60, sleep_time=0.2):
|
||||
def rate_limit(name='test', time_between_visits=2, max_wait_seconds=5 * 60, sleep_time=0.2):
|
||||
lock_file = os.path.join(cache_dir(), 'search-engines.' + name + '.lock')
|
||||
with ExclusiveFile(lock_file, timeout=max_wait_seconds, sleep_time=sleep_time) as f:
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user