mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 18:22:17 -05:00
fix static scan warnings
This commit is contained in:
@@ -33,6 +33,7 @@ class DocumentDownloadClient:
|
||||
"document": file_contents,
|
||||
"is_csv": is_csv or False,
|
||||
},
|
||||
timeout=30
|
||||
)
|
||||
|
||||
response.raise_for_status()
|
||||
|
||||
@@ -29,6 +29,7 @@ class PerformancePlatformClient:
|
||||
self.performance_platform_url + payload["dataType"],
|
||||
json=payload,
|
||||
headers=headers,
|
||||
timeout=30
|
||||
)
|
||||
|
||||
if resp.status_code == 200:
|
||||
|
||||
@@ -35,6 +35,7 @@ def cronitor(task_name):
|
||||
params={
|
||||
"host": current_app.config["API_HOST_NAME"],
|
||||
},
|
||||
timeout=30
|
||||
)
|
||||
resp.raise_for_status()
|
||||
except requests.RequestException as e:
|
||||
|
||||
@@ -30,7 +30,7 @@ def get_certificate(url):
|
||||
res = redis_store.get(url)
|
||||
if res is not None:
|
||||
return res
|
||||
res = requests.get(url).text
|
||||
res = requests.get(url, timeout=30).text
|
||||
redis_store.set(url, res, ex=60 * 60) # 60 minutes
|
||||
_signing_cert_cache[url] = res
|
||||
return res
|
||||
|
||||
@@ -58,7 +58,7 @@ def sns_notification_handler(data, headers):
|
||||
if "SubscribeUrl" in message
|
||||
else message.get("SubscribeURL")
|
||||
)
|
||||
response = requests.get(url)
|
||||
response = requests.get(url, timeout=30)
|
||||
try:
|
||||
response.raise_for_status()
|
||||
except Exception as e:
|
||||
|
||||
@@ -8,7 +8,7 @@ def confirm_subscription(confirmation_request):
|
||||
current_app.logger.warning("SubscribeURL does not exist or empty")
|
||||
return
|
||||
|
||||
response = requests.get(url)
|
||||
response = requests.get(url, timeout=30)
|
||||
try:
|
||||
response.raise_for_status()
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user