Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put hack in place for StreamETH to do 20 concurrent clips instead of 5 #2325

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/api/src/controllers/clip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT of checking with owner.id instead, so it's applied to the owner of the content itself and not the user owning the api key doing the request? I am fine with it either way as only admins are allowed to do cross-clips, for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah let's leave it for now then - we can hopefully roll this back after Devcon anyway

maxProcessingClips = 20;
}

if (processingClips.length >= maxProcessingClips && !clippingUser.admin) {
throw new ForbiddenError("Too many clips are being processed.");
}

Expand Down
Loading