This commit is contained in:
@@ -32,6 +32,7 @@ class PuppeteerHealthcheck:
|
||||
self.target_container = os.getenv('TARGET_CONTAINER', 'puppeteer-api')
|
||||
self.check_interval = int(os.getenv('CHECK_INTERVAL', '60'))
|
||||
self.max_consecutive_failures = int(os.getenv('MAX_CONSECUTIVE_FAILURES', '3'))
|
||||
self.timeout = int(os.getenv('TIMEOUT', '20'))
|
||||
|
||||
# Initialize Docker client with proper error handling
|
||||
self.docker_client = self._initialize_docker_client()
|
||||
@@ -41,6 +42,7 @@ class PuppeteerHealthcheck:
|
||||
logger.info(f" Test URL: {self.test_url}")
|
||||
logger.info(f" Target Container: {self.target_container}")
|
||||
logger.info(f" Check Interval: {self.check_interval} seconds")
|
||||
logger.info(f" Timeout: {self.timeout} seconds")
|
||||
|
||||
def _initialize_docker_client(self):
|
||||
"""Initialize Docker client with proper error handling"""
|
||||
@@ -81,7 +83,7 @@ class PuppeteerHealthcheck:
|
||||
response = requests.get(
|
||||
url,
|
||||
headers=headers,
|
||||
timeout=30,
|
||||
timeout=self.timeout,
|
||||
allow_redirects=True
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user