Merge branch 'adam/log-behavior-status' into qa

This commit is contained in:
Adam Miller 2025-01-06 17:01:41 -08:00
commit 28765a725b

View File

@ -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