mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-06-19 12:24:20 -04:00
fail quickly if browser dies at startup
instead of trying to retrieve /json for 600 seconds
This commit is contained in:
parent
1073431f76
commit
15610fa990
2 changed files with 17 additions and 10 deletions
|
@ -219,16 +219,23 @@ class Chrome:
|
|||
'of %d seconds): %s', json_url, timeout_sec, e)
|
||||
self._last_warning = time.time()
|
||||
finally:
|
||||
e = None
|
||||
if self.chrome_process:
|
||||
if time.time() - self._start > timeout_sec:
|
||||
self.logger.error(
|
||||
'killing chrome, failed to retrieve %s after % '
|
||||
'seconds', json_url, time.time() - self._start)
|
||||
self.stop()
|
||||
raise Exception(
|
||||
'killed chrome, failed to retrieve %s after %s '
|
||||
'seconds' % (json_url, time.time() - self._start))
|
||||
e = Exception(
|
||||
'killing chrome, failed to retrieve %s after '
|
||||
'%s seconds' % (
|
||||
json_url, time.time() - self._start))
|
||||
elif self.chrome_process.poll() is not None:
|
||||
e = Exception(
|
||||
'chrome process died with status %s' % self.chrome_process.poll())
|
||||
else:
|
||||
time.sleep(0.5)
|
||||
else:
|
||||
e = Exception('??? self.chrome_process is not set ???')
|
||||
if e:
|
||||
self.stop()
|
||||
raise e
|
||||
|
||||
def _read_stderr_stdout(self):
|
||||
# XXX select doesn't work on windows
|
||||
|
|
2
setup.py
2
setup.py
|
@ -32,7 +32,7 @@ def find_package_data(package):
|
|||
|
||||
setuptools.setup(
|
||||
name='brozzler',
|
||||
version='1.5.dev312',
|
||||
version='1.5.dev313',
|
||||
description='Distributed web crawling with browsers',
|
||||
url='https://github.com/internetarchive/brozzler',
|
||||
author='Noah Levitt',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue