fix(images): bound external runtime processing
CI / lint (pull_request) Successful in 11s
CI / typecheck (pull_request) Successful in 10s
CI / test (pull_request) Successful in 16s
CI / build (pull_request) Successful in 10s
CI / integration (pull_request) Failing after 2m14s

This commit is contained in:
ekklesia
2026-10-10 10:54:33 -05:00
parent 871d198221
commit 88038476b3
4 changed files with 49 additions and 8 deletions
+5 -4
View File
@@ -177,10 +177,11 @@ export async function processSignageImage(bytes: Uint8Array): Promise<SignagePro
height: metadata.height as number,
width: metadata.width as number,
};
const [display, thumbnail] = await Promise.all([
renderRendition(bytes, SIGNAGE_IMAGE_DISPLAY_RENDITION),
renderRendition(bytes, SIGNAGE_IMAGE_THUMBNAIL_RENDITION),
]);
// Keep peak native CPU and memory bounded inside the shared API process. Upload concurrency is
// already bounded at the module UI; running both renditions for every upload in parallel would
// multiply that concurrency again and can starve the database and storage clients on a small host.
const display = await renderRendition(bytes, SIGNAGE_IMAGE_DISPLAY_RENDITION);
const thumbnail = await renderRendition(bytes, SIGNAGE_IMAGE_THUMBNAIL_RENDITION);
return {
byteSize: bytes.byteLength,