Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sweep:integration] fix (RSS): add a timeout to query gocdb #7972

Open
wants to merge 1 commit into
base: integration
Choose a base branch
from
Open
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: 3 additions & 3 deletions src/DIRAC/Core/LCG/GOCDBClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def getHostnameDowntime(self, hostname, startDate=None, ongoing=False):

try:
response = requests.get(
"https://goc.egi.eu/gocdbpi/public/?method=get_downtime&topentity=" + params, verify=caPath
"https://goc.egi.eu/gocdbpi/public/?method=get_downtime&topentity=" + params, verify=caPath, timeout=20
)
response.raise_for_status()
except requests.exceptions.RequestException as e:
Expand Down Expand Up @@ -270,7 +270,7 @@ def _downTimeCurlDownload(self, entity=None, startDate=None):
gocdb_ep = gocdb_ep + when + gocdbpi_startDate + "&scope="

caPath = getCAsLocation()
dtPage = requests.get(gocdb_ep, verify=caPath)
dtPage = requests.get(gocdb_ep, verify=caPath, timeout=20)

dt = dtPage.text

Expand All @@ -295,7 +295,7 @@ def _getServiceEndpointCurlDownload(self, granularity, entity):
gocdb_ep = "https://goc.egi.eu/gocdbpi/public/?method=get_service_endpoint&" + granularity + "=" + entity

caPath = getCAsLocation()
service_endpoint_page = requests.get(gocdb_ep, verify=caPath)
service_endpoint_page = requests.get(gocdb_ep, verify=caPath, timeout=20)

return service_endpoint_page.text

Expand Down
Loading