mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-23 16:19:49 -05:00
fix: incorrect logic for counting invalid checks
This commit is contained in:
parent
6ef4f0a59c
commit
61d64a1166
@ -793,7 +793,13 @@ class Browser:
|
|||||||
while True:
|
while True:
|
||||||
elapsed = time.time() - start
|
elapsed = time.time() - start
|
||||||
if elapsed > timeout:
|
if elapsed > timeout:
|
||||||
logging.info("behavior reached hard timeout after %.1fs", elapsed)
|
logging.info(
|
||||||
|
"behavior reached hard timeout after %.1fs and %s valid checks, "
|
||||||
|
"and %s invalid checks",
|
||||||
|
elapsed,
|
||||||
|
valid_behavior_checks,
|
||||||
|
invalid_behavior_checks,
|
||||||
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
brozzler.sleep(check_interval)
|
brozzler.sleep(check_interval)
|
||||||
@ -818,6 +824,7 @@ class Browser:
|
|||||||
# valid behavior response while still running
|
# valid behavior response while still running
|
||||||
# {'id': 8, 'result': {'result': {'type': 'boolean', 'value': False}}}
|
# {'id': 8, 'result': {'result': {'type': 'boolean', 'value': False}}}
|
||||||
valid_behavior_checks += 1
|
valid_behavior_checks += 1
|
||||||
|
continue
|
||||||
|
|
||||||
if (
|
if (
|
||||||
msg
|
msg
|
||||||
@ -844,7 +851,7 @@ class Browser:
|
|||||||
invalid_behavior_checks += 1
|
invalid_behavior_checks += 1
|
||||||
|
|
||||||
except BrowsingTimeout:
|
except BrowsingTimeout:
|
||||||
pass
|
invalid_behavior_checks += 1
|
||||||
|
|
||||||
def try_login(self, username, password, timeout=300):
|
def try_login(self, username, password, timeout=300):
|
||||||
try_login_js = (
|
try_login_js = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user