feat(product-suite): add direct job state machine

This commit is contained in:
chengma
2026-07-20 18:12:44 +08:00
parent 2a2cbad7bd
commit aa000ff5e6
11 changed files with 820 additions and 101 deletions
+13 -1
View File
@@ -2776,7 +2776,19 @@ def _save_jpeg(image_bytes, out_path, resolution, jpg_quality):
def _resolution_size(resolution):
return _RESOLUTION_SIZES.get(str(resolution))
text = str(resolution or "").strip().lower()
mapped = _RESOLUTION_SIZES.get(text)
if mapped:
return mapped
if "x" in text:
width, height = text.split("x", 1)
try:
width, height = int(width), int(height)
except (TypeError, ValueError):
return None
if width > 0 and height > 0:
return width, height
return None
def _resolution_size_text(resolution):