Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions utils/notify_slack_about_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

import requests

from ..src.diffusers.utils.constants import DIFFUSERS_REQUEST_TIMEOUT


# Configuration
LIBRARY_NAME = "diffusers"
Expand All @@ -28,7 +26,7 @@

def check_pypi_for_latest_release(library_name):
"""Check PyPI for the latest release of the library."""
response = requests.get(f"https://pypi.org/pypi/{library_name}/json", timeout=DIFFUSERS_REQUEST_TIMEOUT)
response = requests.get(f"https://pypi.org/pypi/{library_name}/json", timeout=60)
if response.status_code == 200:
data = response.json()
return data["info"]["version"]
Expand All @@ -40,7 +38,7 @@ def check_pypi_for_latest_release(library_name):
def get_github_release_info(github_repo):
"""Fetch the latest release info from GitHub."""
url = f"https://api.github.com/repos/{github_repo}/releases/latest"
response = requests.get(url, timeout=DIFFUSERS_REQUEST_TIMEOUT)
response = requests.get(url, timeout=60)

if response.status_code == 200:
data = response.json()
Expand Down