mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 08:39:59 -05:00
Merge branch 'adam/log-behavior-status' into qa
This commit is contained in:
commit
28765a725b
@ -807,6 +807,12 @@ class Browser:
|
|||||||
lambda: self.websock_thread.received_result(msg_id), timeout=5
|
lambda: self.websock_thread.received_result(msg_id), timeout=5
|
||||||
)
|
)
|
||||||
msg = self.websock_thread.pop_result(msg_id)
|
msg = self.websock_thread.pop_result(msg_id)
|
||||||
|
|
||||||
|
self.logger.info("Behavior status is %s", str(msg))
|
||||||
|
# Behavior response while still running
|
||||||
|
# {'id': 8, 'result': {'result': {'type': 'boolean', 'value': False}}}
|
||||||
|
# Behavior response when finished
|
||||||
|
# {'id': 9, 'result': {'result': {'type': 'boolean', 'value': True}}}
|
||||||
if (
|
if (
|
||||||
msg
|
msg
|
||||||
and "result" in msg
|
and "result" in msg
|
||||||
@ -818,7 +824,10 @@ class Browser:
|
|||||||
and type(msg["result"]["result"]["value"]) == bool
|
and type(msg["result"]["result"]["value"]) == bool
|
||||||
and msg["result"]["result"]["value"]
|
and msg["result"]["result"]["value"]
|
||||||
):
|
):
|
||||||
self.logger.info("behavior decided it has finished")
|
self.logger.info(
|
||||||
|
"behavior decided it has finished after %.1fs",
|
||||||
|
time.time() - start,
|
||||||
|
)
|
||||||
return
|
return
|
||||||
except BrowsingTimeout:
|
except BrowsingTimeout:
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user