mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 06:18:21 +08:00
Refactor: Faster device retrying
This commit is contained in:
@@ -6,7 +6,7 @@ from adbutils.errors import AdbError
|
||||
|
||||
from module.base.utils import *
|
||||
from module.device.connection import Connection
|
||||
from module.device.method.utils import (RETRY_DELAY, RETRY_TRIES,
|
||||
from module.device.method.utils import (RETRY_TRIES, retry_sleep,
|
||||
handle_adb_error)
|
||||
from module.exception import RequestHumanTakeover, ScriptError
|
||||
from module.logger import logger
|
||||
@@ -27,7 +27,7 @@ def retry(func):
|
||||
for _ in range(RETRY_TRIES):
|
||||
try:
|
||||
if callable(init):
|
||||
self.sleep(RETRY_DELAY)
|
||||
retry_sleep(_)
|
||||
init()
|
||||
return func(self, *args, **kwargs)
|
||||
# Can't handle
|
||||
|
||||
Reference in New Issue
Block a user