Author SHA1 Message Date
TheRaiwy 19a6c81e51 Auto-zoom out 1% when Persona says 'Move further away'
tests / test (push) Successful in 6s
tests / release (push) Successful in 6s
2026-07-10 20:54:54 +03:00
TheRaiwy f0a6b79a82 Retry on all errors (timeouts, crashes) instead of giving up
tests / test (push) Successful in 5s
tests / release (push) Successful in 6s
2026-07-10 20:47:57 +03:00
+10 -1
View File
@@ -567,6 +567,7 @@ def process_account(driver, acc: dict, donor_video: Path | None,
_draw();
}};
window.__seekDirection = function(dir) {{ _currentDir = dir; }};
window.__zoomOut = function() {{ _scaleX *= 0.99; _scaleY *= 0.99; }};
if (navigator.mediaDevices) {{
navigator.mediaDevices.getUserMedia = function(constraints) {{
@@ -645,6 +646,10 @@ def process_account(driver, acc: dict, donor_video: Path | None,
log.info("Photo rejected, restarting browser")
driver.switch_to.default_content()
return True
if "further away" in body.lower() or "move back" in body.lower():
driver.execute_script("window.__zoomOut();")
log.info("Zoomed out (further away detected)")
time.sleep(1)
if "Session expired" in body:
log.info("Session expired detected during verification")
driver.switch_to.default_content()
@@ -775,7 +780,11 @@ def _process_one(tid: int, acc: dict,
continue
break
except Exception as e:
log.error("[T%d] Error: %s", tid, e)
log.error("[T%d] Error: %s (attempt %d/%d)", tid, e, attempt + 1, max_retries)
if attempt + 1 < max_retries:
log.info("[T%d] Retrying after error...", tid)
time.sleep(5)
continue
break
finally:
if TEST_MODE: