mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-02 03:26:11 -04:00
Refactor the way the proxy is configured. Job/site settings "proxy" and "enable_warcprox_features" are gone. Brozzler-worker now has mutually exclusive options --proxy and --warcprox-auto. --warcprox-auto means find an instance of warcprox in the service registry, and enable warcprox features. --proxy is provided, determines if proxy is warcprox by consulting http://{proxy_address}/status (see 8caae0d7d3
), and enables warcprox features if so.
This commit is contained in:
parent
9a2f181eb6
commit
934190084c
14 changed files with 208 additions and 153 deletions
|
@ -314,9 +314,7 @@ def test_field_defaults():
|
|||
|
||||
# site
|
||||
brozzler.Site.table_ensure(rr)
|
||||
site = brozzler.Site(rr, {
|
||||
'seed': 'http://example.com/', 'enable_warcprox_features': True})
|
||||
assert site.enable_warcprox_features is True
|
||||
site = brozzler.Site(rr, {'seed': 'http://example.com/'})
|
||||
assert site.id is None
|
||||
assert site.scope
|
||||
assert site.scope['surt'] == 'http://(com,example,)/'
|
||||
|
@ -325,15 +323,12 @@ def test_field_defaults():
|
|||
assert site.scope
|
||||
|
||||
tite = brozzler.Site.load(rr, site.id)
|
||||
assert tite.enable_warcprox_features is True
|
||||
assert tite.id == site.id
|
||||
assert tite.scope == site.scope
|
||||
tite.save()
|
||||
assert tite.enable_warcprox_features is True
|
||||
assert tite.id == site.id
|
||||
assert tite.scope == site.scope
|
||||
tite.refresh()
|
||||
assert tite.enable_warcprox_features is True
|
||||
assert tite.id == site.id
|
||||
assert tite.scope == site.scope
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue