diff --git a/utils/NoDriverBrowserCreator.py b/utils/NoDriverBrowserCreator.py index e4548a4..90e12f2 100644 --- a/utils/NoDriverBrowserCreator.py +++ b/utils/NoDriverBrowserCreator.py @@ -58,11 +58,15 @@ async def GetBrowser(proxy=""): browser = await uc.start(sandbox=toSandbox, headless=toHeadless, browser_args=[f'--proxy-server={proxy}','--mute-audio','--disable-3d-apis','--disable-dev-shm-usage','--disable-gpu','--disable-blink-features=AutomationControlled'], - retries = Constants.NODRIVER_BROWSER_CONNECT_RETRIES) + retries = Constants.NODRIVER_BROWSER_CONNECT_RETRIES, + user_data_dir="/ndTemp" + ) else: browser = await uc.start(sandbox=toSandbox, headless=toHeadless, - retries = Constants.NODRIVER_BROWSER_CONNECT_RETRIES) + retries = Constants.NODRIVER_BROWSER_CONNECT_RETRIES, + user_data_dir="/ndTemp" + ) except Exception as e: logger.warning(f"error creating browser in GetBrowser: {e}") await asyncio.sleep(1 * Constants.NODRIVER_WAIT_MULTIPLIER) diff --git a/utils/StaticMethods.py b/utils/StaticMethods.py index f9a551c..813093b 100644 --- a/utils/StaticMethods.py +++ b/utils/StaticMethods.py @@ -265,8 +265,8 @@ def rebootServer() -> None: os.system('reboot') def safeRebootServer() -> None: - time.sleep(300) logger.warning("Scheduled restart is happening.\nSleeping for 300 seconds before restart, in case something goes horribly wrong") + time.sleep(300) rebootServer() def GetThumbnail(tempThumbUrl, constantsThumbnail):