Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
increase download max wait time and change logs (#2232)
Shuchang Zheng8b184ce97018
diff --git a/skyvern/constants.py b/skyvern/constants.pyindex 372868c61..ce485d910 100644--- a/skyvern/constants.py+++ b/skyvern/constants.py@@ -10,7 +10,7 @@ INPUT_TEXT_TIMEOUT = 120000 # 2 minutesPAGE_CONTENT_TIMEOUT = 300 # 5 minsBUILDING_ELEMENT_TREE_TIMEOUT_MS = 60 * 1000 # 1 minuteBROWSER_CLOSE_TIMEOUT = 180 # 3 minute-BROWSER_DOWNLOAD_MAX_WAIT_TIME = 120 # 2 minute+BROWSER_DOWNLOAD_MAX_WAIT_TIME = 1200 # 20 minuteBROWSER_DOWNLOAD_TIMEOUT = 600 # 10 minuteDOWNLOAD_FILE_PREFIX = "downloads"SAVE_DOWNLOADED_FILES_TIMEOUT = 180diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.pyindex a2f00890b..449ad3560 100644--- a/skyvern/webeye/actions/handler.py+++ b/skyvern/webeye/actions/handler.py@@ -620,18 +620,22 @@ async def handle_click_to_download_file_action(return [ActionFailure(e, download_triggered=False)]try:+ LOG.info(+ "Checking if there is any new files after click",+ download_dir=download_dir,+ )async with asyncio.timeout(BROWSER_DOWNLOAD_MAX_WAIT_TIME):while True:list_files_after = list_files_in_directory(download_dir)- LOG.info(- "Number of files in download directory after click",- num_downloaded_files_after=len(list_files_after),- download_dir=download_dir,- task_id=task.task_id,- step_id=step.step_id,- workflow_run_id=task.workflow_run_id,- )if len(list_files_after) > len(list_files_before):+ LOG.info(+ "Found new files in download directory after click",+ num_downloaded_files_after=len(list_files_after),+ download_dir=download_dir,+ task_id=task.task_id,+ step_id=step.step_id,+ workflow_run_id=task.workflow_run_id,+ )breakawait asyncio.sleep(1)