diff --git a/app/opensense.py b/app/opensense.py index d7f8aec..03500cd 100644 --- a/app/opensense.py +++ b/app/opensense.py @@ -51,7 +51,11 @@ def get_temperature(): print('Getting data from OpenSenseMap API...') try: - response = requests.get("https://api.opensensemap.org/boxes", params=params, timeout=480) + response = requests.get( + "https://api.opensensemap.org/boxes", + params=params, + timeout=(3, 10) + ) print('Data retrieved successfully!') except requests.Timeout: print("API request timed out") diff --git a/helm-chart/templates/deployment.yaml b/helm-chart/templates/deployment.yaml index 22c9c78..c8f283b 100644 --- a/helm-chart/templates/deployment.yaml +++ b/helm-chart/templates/deployment.yaml @@ -43,7 +43,7 @@ spec: path: /readyz port: 5000 periodSeconds: 60 - timeoutSeconds: 3 + timeoutSeconds: 300 failureThreshold: 3 livenessProbe: httpGet: