fix(images): bound external runtime processing
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user