From 2bb3b0ab4bd015e3e561266072580192af25cca3 Mon Sep 17 00:00:00 2001 From: Thom Shutt Date: Mon, 11 Nov 2024 10:20:24 +0000 Subject: [PATCH] Put hack in place for StreamETH to do 20 concurrent clips instead of 5 (#2325) --- packages/api/src/controllers/clip.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/api/src/controllers/clip.ts b/packages/api/src/controllers/clip.ts index 98b2e305c..7c704b0e4 100644 --- a/packages/api/src/controllers/clip.ts +++ b/packages/api/src/controllers/clip.ts @@ -121,7 +121,13 @@ app.post( 5, ); - if (processingClips.length >= MAX_PROCESSING_CLIPS && !clippingUser.admin) { + // Hack to let StreamETH have a higher clipping limit without having to do the work to put this on the User object + let maxProcessingClips = MAX_PROCESSING_CLIPS; + if (req.user.id == "05f04681-b600-4a9b-81ea-1f56e7871f04") { + maxProcessingClips = 20; + } + + if (processingClips.length >= maxProcessingClips && !clippingUser.admin) { throw new ForbiddenError("Too many clips are being processed."); }