fix: address pipeline-reliability verify findings
Close the source image after converting to RGBA so PNGs at the pixel limit fit the render memory limit. Strengthen the fencing test so that it fails without the attempt check, and measure worker and relay stops under load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,7 +81,11 @@ def _prepared(image: Image.Image) -> Image.Image:
|
||||
# вырос бы с ~320 до ~480 МиБ
|
||||
return image
|
||||
if image.mode in _ALPHA_MODES or "transparency" in image.info:
|
||||
return image.convert("RGBA")
|
||||
converted = image.convert("RGBA")
|
||||
# исходник дальше не нужен: на 40 млн пикселей с ним на время масштаба
|
||||
# пик выше лимита процесса (четыре байта на пиксель у LA и RGB тоже)
|
||||
image.close()
|
||||
return converted
|
||||
if image.mode == "1":
|
||||
return image.convert("L")
|
||||
if image.mode in ("P", "CMYK"):
|
||||
|
||||
Reference in New Issue
Block a user