Reduce execution waits (#2282)

This commit is contained in:
Shuchang Zheng
2025-05-03 21:30:09 -07:00
committed by GitHub
parent 2545405b57
commit a851e8fdd8
3 changed files with 6 additions and 6 deletions

View File

@@ -593,7 +593,7 @@ class BrowserState:
async def navigate_to_url(self, page: Page, url: str, retry_times: int = NAVIGATION_MAX_RETRY_TIME) -> None:
try:
for retry_time in range(retry_times):
LOG.info(f"Trying to navigate to {url} and waiting for 5 seconds.", url=url, retry_time=retry_time)
LOG.info(f"Trying to navigate to {url} and waiting for 1 second.", url=url, retry_time=retry_time)
try:
start_time = time.time()
await page.goto(url, timeout=settings.BROWSER_LOADING_TIMEOUT_MS)
@@ -617,8 +617,8 @@ class BrowserState:
url=url,
retry_time=retry_time,
)
# Wait for 5 seconds before retrying
await asyncio.sleep(5)
# Wait for 1 seconds before retrying
await asyncio.sleep(1)
except Exception as e:
LOG.exception(