fix: EXR/HDR decode failures and batch network timeout

EXR: add ffmpeg fallback when ImageMagick lacks the OpenEXR delegate
(common on macOS Homebrew installs). HDR: force 8-bit depth output to
prevent CLAHE crash (hist_local requires VIPS_FORMAT_UCHAR). Batch:
disable socket timeout and increase server requestTimeout to 30 min
so large AI batches don't get killed by Node.js defaults.
This commit is contained in:
SnapOtter
2026-05-13 14:19:51 +08:00
parent 648c8c12f5
commit 917c1ff773
3 changed files with 28 additions and 4 deletions
+5
View File
@@ -37,6 +37,11 @@ export async function registerBatchRoutes(app: FastifyInstance): Promise<void> {
async (request: FastifyRequest<{ Params: { toolId: string } }>, reply: FastifyReply) => {
const { toolId } = request.params;
// Batch processing (especially with AI) can take tens of minutes.
// Disable the Node.js HTTP socket timeout so the connection is not
// dropped while images are still being processed.
request.raw.socket?.setTimeout?.(0);
// Look up the tool config from the registry
const toolConfig = getToolConfig(toolId);
if (!toolConfig) {