mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 08:39:59 -05:00
Make Browser._wait_for sleep time a varible
Useful to be able to tweak this value in other apps using `Browser`.
This commit is contained in:
parent
0d605d0a88
commit
e2128b42f0
@ -288,6 +288,7 @@ class Browser:
|
|||||||
self.websock_thread = None
|
self.websock_thread = None
|
||||||
self.is_browsing = False
|
self.is_browsing = False
|
||||||
self._command_id = Counter()
|
self._command_id = Counter()
|
||||||
|
self._wait_interval = 0.5
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
self.start()
|
self.start()
|
||||||
@ -309,7 +310,7 @@ class Browser:
|
|||||||
raise BrowsingTimeout(
|
raise BrowsingTimeout(
|
||||||
'timed out after %.1fs waiting for: %s' % (
|
'timed out after %.1fs waiting for: %s' % (
|
||||||
elapsed, callback))
|
elapsed, callback))
|
||||||
brozzler.sleep(0.5)
|
brozzler.sleep(self._wait_interval)
|
||||||
|
|
||||||
def send_to_chrome(self, suppress_logging=False, **kwargs):
|
def send_to_chrome(self, suppress_logging=False, **kwargs):
|
||||||
msg_id = next(self._command_id)
|
msg_id = next(self._command_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user