Align integration contract and image generation validation
This commit is contained in:
@@ -146,6 +146,7 @@ def install_ai_images(app, service):
|
||||
}
|
||||
).encode(),
|
||||
limit=service.settings.max_bytes,
|
||||
timeout=180,
|
||||
)
|
||||
result = json.loads(raw)["data"]
|
||||
if len(result) != 1:
|
||||
|
||||
@@ -161,6 +161,7 @@ class Assets:
|
||||
body=None,
|
||||
limit=None,
|
||||
accepted_status=(200,),
|
||||
timeout=10,
|
||||
):
|
||||
limit = limit or self.settings.max_bytes
|
||||
parsed = urlsplit(url)
|
||||
@@ -193,12 +194,12 @@ class Assets:
|
||||
|
||||
class PinnedHTTPS(http.client.HTTPSConnection):
|
||||
def connect(self):
|
||||
sock = socket.create_connection((ip, 443), timeout=10)
|
||||
sock = socket.create_connection((ip, 443), timeout=timeout)
|
||||
self.sock = ssl.create_default_context().wrap_socket(
|
||||
sock, server_hostname=parsed.hostname
|
||||
)
|
||||
|
||||
connection = PinnedHTTPS(parsed.hostname, timeout=10)
|
||||
connection = PinnedHTTPS(parsed.hostname, timeout=timeout)
|
||||
try:
|
||||
connection.request(
|
||||
method,
|
||||
|
||||
Reference in New Issue
Block a user