Skip to content

Commit 6ad2885

Browse files
committed
timeout change
1 parent d59ed7a commit 6ad2885

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

edubotics_core/config/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
load_dotenv(".env")
77

88
# Centralized definition of required constants for easy management and access
9-
TIMEOUT = os.getenv("TIMEOUT", 60)
9+
TIMEOUT = os.getenv("TIMEOUT", 120)
1010
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY", "")
1111
LLAMA_CLOUD_API_KEY = os.getenv("LLAMA_CLOUD_API_KEY", "")
1212
HUGGINGFACE_TOKEN = os.getenv("HUGGINGFACE_TOKEN", "")

edubotics_core/dataloader/webpage_crawler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def url_exists(self, url: str) -> bool:
2424
try:
2525
response = requests.head(url, timeout=TIMEOUT)
2626
return response.status_code == 200
27-
except requests.ConnectionError:
27+
except Exception as e:
28+
print(f"Error checking if URL exists: {e}")
2829
return False
2930

3031
async def get_links(self, session: ClientSession, website_link: str, base_url: str):

0 commit comments

Comments
 (0)