feat: 60 s timeout for custom_generate endpoint

* increased timeout for custom_generate to 60 s
* prevents many timeouts if wait_audio is set to true on Vercel
* highest possible value to work in all Vercel tiers
This commit is contained in:
Johannes Nicolai 2024-05-24 14:26:26 +02:00 committed by GitHub
parent cfa3e0ab7f
commit b4704cd2b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,7 @@ import { NextResponse, NextRequest } from "next/server";
import { sunoApi } from "@/lib/SunoApi"; import { sunoApi } from "@/lib/SunoApi";
import { corsHeaders } from "@/lib/utils"; import { corsHeaders } from "@/lib/utils";
export const maxDuration = 60; // allow longer timeout for wait_audio == true
export const dynamic = "force-dynamic"; export const dynamic = "force-dynamic";
export async function POST(req: NextRequest) { export async function POST(req: NextRequest) {