Skip to content

Commit

Permalink
Merge pull request DIRACGrid#7972 from DIRACGridBot/cherry-pick-2-ce2…
Browse files Browse the repository at this point in the history
…4c5664-integration

[sweep:integration] fix (RSS): add a timeout to query gocdb
  • Loading branch information
fstagni authored Jan 7, 2025
2 parents 457b6fb + 52ebd67 commit 53164a5
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 53164a5

Please sign in to comment.