Skip to content

Commit 7828b1e

Browse files
waleedlatif1claude
andcommitted
fix(polling): use literal for maxDuration segment config
Next.js requires segment config exports to be statically analyzable literals. Using a variable reference caused build failure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4a1000c commit 7828b1e

File tree

1 file changed

+2
-2
lines changed
  • apps/sim/app/api/webhooks/poll/[provider]

1 file changed

+2
-2
lines changed

apps/sim/app/api/webhooks/poll/[provider]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { pollProvider, VALID_POLLING_PROVIDERS } from '@/lib/webhooks/polling'
77

88
const logger = createLogger('PollingAPI')
99

10-
/** Lock TTL in seconds — matches maxDuration so the lock auto-expires if the function times out. */
10+
/** Lock TTL in seconds — must match maxDuration so the lock auto-expires if the function times out. */
1111
const LOCK_TTL_SECONDS = 180
1212

1313
export const dynamic = 'force-dynamic'
14-
export const maxDuration = LOCK_TTL_SECONDS
14+
export const maxDuration = 180
1515

1616
export async function GET(
1717
request: NextRequest,

0 commit comments

Comments
 (0)