mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-07-23 23:10:49 -04:00
wait for a browser to become available and start it up before reading the next url from amqp; ack the message only after completing the browsing process successfully, and requeue if it's not successful; some refactoring to make the timing work for this
This commit is contained in:
parent
e3c23a0f2b
commit
a78e60f1da
4 changed files with 145 additions and 78 deletions
|
@ -24,7 +24,7 @@ args = arg_parser.parse_args(args=sys.argv[1:])
|
|||
logging.basicConfig(stream=sys.stdout, level=args.log_level,
|
||||
format='%(asctime)s %(process)d %(levelname)s %(threadName)s %(name)s.%(funcName)s(%(filename)s:%(lineno)d) %(message)s')
|
||||
|
||||
browser = umbra.Browser(chrome_exe=args.chrome_exe, chrome_wait=args.browser_wait)
|
||||
for url in args.urls:
|
||||
browser.browse_page(url)
|
||||
with umbra.Browser(chrome_exe=args.chrome_exe, chrome_wait=args.browser_wait) as browser:
|
||||
for url in args.urls:
|
||||
browser.browse_page(url)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue