feat: add on-demand device screenshots
Tests / Test apps.device-host-agent.tests.test_mcp_token.test_load_or_create_concurrent_calls_do_not_corrupt failed
Tests / Test apps.device-host-agent.tests.test_mcp_token.test_load_or_create_concurrent_calls_do_not_corrupt failed
This commit is contained in:
+7
-1
@@ -130,7 +130,13 @@ class DeviceManager:
|
||||
if driver is None:
|
||||
return False
|
||||
try:
|
||||
driver.screenshot()
|
||||
health_check = getattr(driver, "health_check", None)
|
||||
if callable(health_check):
|
||||
health_check()
|
||||
else:
|
||||
# Compatibility for drivers implemented before health_check
|
||||
# existed. Built-in drivers use the non-screen health check.
|
||||
driver.screenshot()
|
||||
except Exception:
|
||||
self.mark_error(device_id, offline=True)
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user