From 8d2e240a2a1d10c7f4c160a7ccec5691f09c9c15 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Tue, 8 Feb 2022 20:01:24 +0100 Subject: [PATCH] When using Env. FETCH_WORKERS or WEBDRIVER_DELAY_BEFORE_CONTENT_READY , it should be type int --- changedetectionio/__init__.py | 2 +- changedetectionio/content_fetcher.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 6735a566..396b7be0 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -1043,7 +1043,7 @@ def ticker_thread_check_time_launch_checks(): # Spin up Workers that do the fetching # Can be overriden by ENV or use the default settings - n_workers = os.getenv("FETCH_WORKERS", datastore.data['settings']['requests']['workers']) + n_workers = int(os.getenv("FETCH_WORKERS", datastore.data['settings']['requests']['workers'])) for _ in range(n_workers): new_worker = update_worker.update_worker(update_q, notification_q, app, datastore) running_update_threads.append(new_worker) diff --git a/changedetectionio/content_fetcher.py b/changedetectionio/content_fetcher.py index 436a652d..890ff65d 100644 --- a/changedetectionio/content_fetcher.py +++ b/changedetectionio/content_fetcher.py @@ -120,7 +120,7 @@ class html_webdriver(Fetcher): # raise EmptyReply(url=url, status_code=r.status_code) # @todo - dom wait loaded? - time.sleep(os.getenv("WEBDRIVER_DELAY_BEFORE_CONTENT_READY", 5)) + time.sleep(int(os.getenv("WEBDRIVER_DELAY_BEFORE_CONTENT_READY", 5))) self.content = driver.page_source self.headers = {}